mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Fixes invalid NT header check in variant
Ensures the NT header signature check uses a capture to avoid potential issues with variable scope.
This commit is contained in:
@@ -233,7 +233,8 @@ namespace
|
|||||||
constexpr bool invalid_nt_header_file(const NtHeaderVariant& variant)
|
constexpr bool invalid_nt_header_file(const NtHeaderVariant& variant)
|
||||||
{
|
{
|
||||||
constexpr std::uint32_t nt_hdr_magic = 0x4550;
|
constexpr std::uint32_t nt_hdr_magic = 0x4550;
|
||||||
return std::visit([](const auto& header) -> bool { return header.signature != nt_hdr_magic; }, variant);
|
return std::visit([&nt_hdr_magic](const auto& header) -> bool { return header.signature != nt_hdr_magic; },
|
||||||
|
variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ExtractedSection
|
struct ExtractedSection
|
||||||
|
|||||||
Reference in New Issue
Block a user