From 71c003dcdbe5253ca79881adea3d0ce3c3597541 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 26 Mar 2020 21:30:58 -0400 Subject: through LoadSaveblockMapHeader --- src/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script.c') diff --git a/src/script.c b/src/script.c index ff74b40bc..5d691247f 100644 --- a/src/script.c +++ b/src/script.c @@ -358,7 +358,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr) u8 *mapheader_get_tagged_pointer(u8 tag) { - u8 *mapScripts = gMapHeader.mapScripts; + const u8 *mapScripts = gMapHeader.mapScripts; if (mapScripts == NULL) return NULL; @@ -370,7 +370,7 @@ u8 *mapheader_get_tagged_pointer(u8 tag) if (*mapScripts == tag) { mapScripts++; - return (u8 *)(mapScripts[0] + (mapScripts[1] << 8) + (mapScripts[2] << 16) + (mapScripts[3] << 24)); + return T2_READ_PTR(mapScripts); } mapScripts += 5; } -- cgit v1.2.3