From 075d1ceba0e248e2f0fbb10b8b680aa1056c24f4 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 24 Sep 2021 15:01:44 +0200 Subject: [PATCH] Fix R_PPC_REL24 relocation --- source/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main.cpp b/source/main.cpp index 87205b8..bcaf77b 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -158,7 +158,7 @@ bool elfLinkOne(char type, size_t offset, int32_t addend, uint32_t destination, break; } } - if (freeSlot != NULL) { + if (freeSlot == nullptr) { DEBUG_FUNCTION_LINE("***24-bit relative branch cannot hit target. Trampolin data list is full\n"); DEBUG_FUNCTION_LINE("***value %08X - target %08X = distance %08X\n", value, target, distance); return false;