From 024963b042f797d1099769103be81dc4152edfe9 Mon Sep 17 00:00:00 2001 From: Dethrace Labs <78985374+dethrace-labs@users.noreply.github.com> Date: Mon, 3 Nov 2025 10:32:23 +1300 Subject: [PATCH] InitInterfaceLoadState matching --- src/DETHRACE/common/loading.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DETHRACE/common/loading.c b/src/DETHRACE/common/loading.c index 9500afa0..edcdd646 100644 --- a/src/DETHRACE/common/loading.c +++ b/src/DETHRACE/common/loading.c @@ -883,8 +883,12 @@ void UnlockInterfaceStuff(void) { // IDA: void __cdecl InitInterfaceLoadState() // FUNCTION: CARM95 0x0041dcc7 void InitInterfaceLoadState(void) { + int i; - memset(gCursors, 0, sizeof(gCursors)); + // original code uses 4, not BR_ASIZE(gCursors). Bug? + for (i = 0; i < 4; i++) { + gCursors[i] = NULL; + } } // IDA: tS8* __usercall ConvertPixTo16BitStripMap@(br_pixelmap *pBr_map@)