From efe5017788ad99806b5db6ab33f25ece49fb928b Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 30 Apr 2020 19:09:31 +0200 Subject: [PATCH] Clarify comments in the PE architecture detection --- src/plugin/host-bridge.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugin/host-bridge.cpp b/src/plugin/host-bridge.cpp index ebb36ab7..e5f10780 100644 --- a/src/plugin/host-bridge.cpp +++ b/src/plugin/host-bridge.cpp @@ -596,14 +596,14 @@ PluginArchitecture find_plugin_architecture(fs::path plugin_path) { std::ifstream file(plugin_path, std::ifstream::binary | std::ifstream::in); // The linker will place the offset where the PE signature is placed at the - // end of the MS-DOS stub, at this offset + // end of the MS-DOS stub, at offset 0x3c uint32_t pe_signature_offset; file.seekg(0x3c); file.read(reinterpret_cast(&pe_signature_offset), sizeof(pe_signature_offset)); - // The PE32 signature will be followed by a magic number. - // file >> pe_signature_offset; + // The PE32 signature will be followed by a magic number that indicates the + // target architecture of the binary uint32_t pe_signature; uint16_t machine_type; file.seekg(pe_signature_offset);