From 7880f4f0636cd79fa3dbab04bb862d48cf93a68e Mon Sep 17 00:00:00 2001 From: fusion32 Date: Wed, 10 Sep 2025 18:27:20 -0300 Subject: fix problem when compiling in 32-bit + add license --- memscan.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'memscan.cc') diff --git a/memscan.cc b/memscan.cc index 674194a..9fdc3d0 100644 --- a/memscan.cc +++ b/memscan.cc @@ -2,6 +2,7 @@ #include #include #include +#include #define WIN32_LEAN_AND_MEAN 1 #include @@ -28,7 +29,7 @@ void DebugPrintBuf(uintptr Address, const uint8 *Buffer, int Count){ int Remainder = Count % BytesPerLine; for(int i = 0; i < FullLines; i += 1){ - printf("%16llX | ", (Address + i * BytesPerLine)); + printf("%16" PRIXPTR " | ", (Address + i * BytesPerLine)); for(int j = 0; j < BytesPerLine; j += 1){ if(j > 0) putchar(' '); @@ -46,7 +47,7 @@ void DebugPrintBuf(uintptr Address, const uint8 *Buffer, int Count){ } if(Remainder > 0){ - printf("%16llX | ", (Address + FullLines * BytesPerLine)); + printf("%16" PRIXPTR " | ", (Address + FullLines * BytesPerLine)); for(int j = 0; j < BytesPerLine; j += 1){ if(j > 0) putchar(' '); @@ -225,7 +226,7 @@ int main(int argc, char **argv){ uintptr BaseAddr = 0; MEMORY_BASIC_INFORMATION Info; while(VirtualQueryEx(Process, (void*)BaseAddr, &Info, sizeof(Info)) != 0){ - if(Info.State & MEM_COMMIT && !(Info.Protect & PAGE_NOACCESS) && !(Info.Protect & PAGE_GUARD)){ + if((Info.State & MEM_COMMIT) && !(Info.Protect & PAGE_NOACCESS) && !(Info.Protect & PAGE_GUARD)){ ScanProcessMemory(Process, (uintptr)Info.BaseAddress, Info.RegionSize, Data, DataSize, ContextWindow); } BaseAddr = (uintptr)Info.BaseAddress + Info.RegionSize; -- cgit v1.2.3