summaryrefslogtreecommitdiff
path: root/src/script.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-03-26 21:30:58 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-03-26 21:30:58 -0400
commit71c003dcdbe5253ca79881adea3d0ce3c3597541 (patch)
tree1d18ec6a076277ce0a8c7b01c8d8472cbb023df9 /src/script.c
parent012f8ed12f2425a13602ec2cb3cb379d756b8bbd (diff)
through LoadSaveblockMapHeader
Diffstat (limited to 'src/script.c')
-rw-r--r--src/script.c4
1 files changed, 2 insertions, 2 deletions
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;
}