From d836567db1f3e278f52e61f88e075db56a0174c9 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 22 Jan 2025 14:06:07 +0100 Subject: [PATCH] Fix PE parsing --- src/common/platform/win_pefile.hpp | 2 +- src/common/utils/path_key.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/platform/win_pefile.hpp b/src/common/platform/win_pefile.hpp index 20c1327a..24acb4ab 100644 --- a/src/common/platform/win_pefile.hpp +++ b/src/common/platform/win_pefile.hpp @@ -278,7 +278,7 @@ typedef struct _IMAGE_BASE_RELOCATION { DWORD VirtualAddress; DWORD SizeOfBlock; - WORD TypeOffset[1]; + // WORD TypeOffset[1]; } IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION; #endif diff --git a/src/common/utils/path_key.hpp b/src/common/utils/path_key.hpp index b45163f5..617f0993 100644 --- a/src/common/utils/path_key.hpp +++ b/src/common/utils/path_key.hpp @@ -42,7 +42,7 @@ namespace utils auto key_string = key.u16string(); std::ranges::replace(key_string, u'\\', '/'); - auto path = std::filesystem::path(key).lexically_normal().wstring(); + auto path = std::filesystem::path(key_string).lexically_normal().wstring(); return utils::string::to_lower_consume(path); }