From 3909b6408c0125fe311d49a3029a2806993615f7 Mon Sep 17 00:00:00 2001 From: nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> Date: Thu, 29 Nov 2018 19:24:28 +0800 Subject: Fix alloc.c as per #386, define INVALID_ constants and rename malloc to alloc as per #325 Some of the INVALID_ are likely erroneously placed, due to lack of documentation --- src/script.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/script.c') diff --git a/src/script.c b/src/script.c index c61ae7183..4e133a188 100644 --- a/src/script.c +++ b/src/script.c @@ -391,11 +391,11 @@ bool32 sub_80991F8(void) struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; if (scriptData->magic != RAM_SCRIPT_MAGIC) return FALSE; - if (scriptData->mapGroup != 0xFF) + if (scriptData->mapGroup != INVALID_U8) return FALSE; - if (scriptData->mapNum != 0xFF) + if (scriptData->mapNum != INVALID_U8) return FALSE; - if (scriptData->objectId != 0xFF) + if (scriptData->objectId != INVALID_U8) return FALSE; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) return FALSE; @@ -409,11 +409,11 @@ u8 *sub_8099244(void) return NULL; if (scriptData->magic != RAM_SCRIPT_MAGIC) return NULL; - if (scriptData->mapGroup != 0xFF) + if (scriptData->mapGroup != INVALID_U8) return NULL; - if (scriptData->mapNum != 0xFF) + if (scriptData->mapNum != INVALID_U8) return NULL; - if (scriptData->objectId != 0xFF) + if (scriptData->objectId != INVALID_U8) return NULL; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) { -- cgit v1.2.3