From 699273c86d2d77094f1d05e42d53f221f369998e Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 26 Dec 2020 15:51:21 +0100 Subject: [PATCH] Rename WUMS_MODULE_INIT_BEFORE_ENTRYPOINT => WUMS_MODULE_INIT_BEFORE_RELOCATION_DONE_HOOK, add WUMS_MODULE_SKIP_ENTRYPOINT --- source/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index 87bd927..cb7f2f9 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -11,7 +11,8 @@ #include "function_replacements.h" WUMS_MODULE_EXPORT_NAME("homebrew_memorymapping"); -WUMS_MODULE_INIT_BEFORE_ENTRYPOINT(); +WUMS_MODULE_SKIP_ENTRYPOINT(); +WUMS_MODULE_INIT_BEFORE_RELOCATION_DONE_HOOK(); WUMS_INITIALIZE() { WHBLogUdpInit(); @@ -42,7 +43,7 @@ WUMS_APPLICATION_STARTS() { void *address = (void *) (mem_mapping[i].effective_start_address); MEMExpHeapBlock *curUsedBlock = ((MEMExpHeap *) address)->usedList.head; - while (curUsedBlock != 0) { + while (curUsedBlock != nullptr) { DEBUG_FUNCTION_LINE("[Memory leak info] %08X is still allocated (%d bytes)", &curUsedBlock[1], curUsedBlock->blockSize); curUsedBlock = curUsedBlock->next; }