Skip to content

Commit e6f9090

Browse files
committed
fix: print address with type and protection
1 parent 16b8857 commit e6f9090

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

fluctuate.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,34 @@ void DumpHex(const void* data, size_t size) {
3737

3838
void print_protection(void* address, DWORD protections) {
3939
if (protections & PAGE_READONLY)
40-
wprintf(L"print_protection: 0x%p is PAGE_READONLY\n");
40+
wprintf(L"print_protection: 0x%p is PAGE_READONLY\n", address);
4141
if (protections & PAGE_READWRITE)
42-
wprintf(L"print_protection: 0x%p is PAGE_READWRITE\n");
42+
wprintf(L"print_protection: 0x%p is PAGE_READWRITE\n", address);
4343
if (protections & PAGE_NOACCESS)
44-
wprintf(L"print_protection: 0x%p is PAGE_NOACCESS\n");
44+
wprintf(L"print_protection: 0x%p is PAGE_NOACCESS\n", address);
4545
if (protections & PAGE_WRITECOPY)
46-
wprintf(L"print_protection: 0x%p is PAGE_WRITECOPY\n");
46+
wprintf(L"print_protection: 0x%p is PAGE_WRITECOPY\n", address);
4747
if (protections & PAGE_EXECUTE)
48-
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE\n");
48+
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE\n", address);
4949
if (protections & PAGE_EXECUTE_READ)
50-
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_READ\n");
50+
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_READ\n", address);
5151
if (protections & PAGE_EXECUTE_READWRITE)
52-
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_READWRITE\n");
52+
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_READWRITE\n", address);
5353
if (protections & PAGE_EXECUTE_WRITECOPY)
54-
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_WRITECOPY\n");
54+
wprintf(L"print_protection: 0x%p is PAGE_EXECUTE_WRITECOPY\n", address);
5555
if (protections & PAGE_GUARD)
56-
wprintf(L"print_protection: 0x%p is PAGE_GUARD\n");
56+
wprintf(L"print_protection: 0x%p is PAGE_GUARD\n", address);
5757
if (protections & PAGE_NOCACHE)
58-
wprintf(L"print_protection: 0x%p is PAGE_NOCACHE\n");
58+
wprintf(L"print_protection: 0x%p is PAGE_NOCACHE\n", address);
5959
}
6060

6161
void print_type(void* address, DWORD type) {
6262
if (type & MEM_IMAGE)
63-
wprintf(L"print_type: 0x%p is MEM_IMAGE\n");
63+
wprintf(L"print_type: 0x%p is MEM_IMAGE\n", address);
6464
if (type & MEM_MAPPED)
65-
wprintf(L"print_type: 0x%p is MEM_MAPPED\n");
65+
wprintf(L"print_type: 0x%p is MEM_MAPPED\n", address);
6666
if (type & MEM_PRIVATE)
67-
wprintf(L"print_type: 0x%p is MEM_PRIVATE\n");
67+
wprintf(L"print_type: 0x%p is MEM_PRIVATE\n", address);
6868
}
6969
#endif
7070

0 commit comments

Comments
 (0)