Minor fixes.

This commit is contained in:
Can Bölük 2020-08-29 10:28:56 +02:00
parent c7e7b39a36
commit f735add3ef
2 changed files with 3 additions and 2 deletions

View file

@ -42,7 +42,7 @@ namespace vtil
{
// Name of the section.
//
std::string_view name = nullptr;
std::string_view name = "";
// Characteristics of the section.
//

View file

@ -513,8 +513,9 @@ namespace vtil
{
auto dos_header = ( dos_header_t* ) self->cdata();
auto* nt_hdrs = dos_header->get_nt_headers<true>();
if( nt_hdrs->file_header.machine == machine_id::amd64 )
return fn( carry_const( self, nt_hdrs ) );
return fn( carry_const( self, ( nt_headers_x64_t* ) nt_hdrs ) );
else
return fn( carry_const( self, ( nt_headers_x86_t* ) nt_hdrs ) );
}