summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Calixte <remicalixte.rmc@gmail.com>2021-08-14 13:16:36 +0200
committerRémi Calixte <remicalixte.rmc@gmail.com>2021-08-14 13:16:36 +0200
commit57351f30edb58f09bba1cab85280e014a5d2e834 (patch)
tree7909b8315d3776e71d142a5c6fe88045f3bfc9d2
parentf2c5ab8f4b9a50829f0e9e18f564fb215f749085 (diff)
fix fakematch
-rw-r--r--arm9/src/unk_02008DEC.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arm9/src/unk_02008DEC.c b/arm9/src/unk_02008DEC.c
index 183a9c81..3050110b 100644
--- a/arm9/src/unk_02008DEC.c
+++ b/arm9/src/unk_02008DEC.c
@@ -559,22 +559,18 @@ THUMB_FUNC void FUN_02009668(u32 *param0, struct UnkStruct_02008DEC_2 *param1, u
param1->unk04 = FUN_020099E8((struct UnkStruct_02008DEC_4 *)(param0 + 1));
- void *ptr;
if (param1->unk04 > 0)
{
- ptr = AllocFromHeap(param2, param1->unk04 * sizeof(struct UnkStruct_02008DEC_4));
+ param1->unk00 = AllocFromHeap(param2, param1->unk04 * sizeof(struct UnkStruct_02008DEC_4));
}
else
{
- ptr = NULL;
+ param1->unk00 = NULL;
}
- param1->unk00 = ptr;
- // use volatile to force a reload here
- void *r0 = *((void *volatile *)param1);
- if (r0 != NULL)
+ if (param1->unk00 != NULL)
{
- memcpy(r0, param0 + 1, param1->unk04 * sizeof(struct UnkStruct_02008DEC_4));
+ memcpy(param1->unk00, param0 + 1, param1->unk04 * sizeof(struct UnkStruct_02008DEC_4));
}
}