From c43f550a7ef6170ea23fb8abb4372e14e1ac3912 Mon Sep 17 00:00:00 2001 From: Matthew Coppola Date: Mon, 9 Dec 2024 16:20:56 -0500 Subject: [PATCH] Prevent crash when copying player data --- src/game/filemgr.c | 2 +- src/include/game/filemgr.h | 2 +- src/include/types.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/filemgr.c b/src/game/filemgr.c index ab0e15ef9..e82d7af15 100644 --- a/src/game/filemgr.c +++ b/src/game/filemgr.c @@ -913,7 +913,7 @@ const char var7f1b31ec[] = "Multiplayer %d was using that file...\n"; * * Return true if it worked, otherwise false. */ -bool filemgrSaveOrLoad(struct fileguid *guid, s32 fileop, u32 playernum) +bool filemgrSaveOrLoad(struct fileguid *guid, s32 fileop, uintptr_t playernum) { s32 device; diff --git a/src/include/game/filemgr.h b/src/include/game/filemgr.h index 80695df9d..389299af2 100644 --- a/src/include/game/filemgr.h +++ b/src/include/game/filemgr.h @@ -25,7 +25,7 @@ void filemgrEraseCorruptFile(void); char *filemgrMenuTextInsertOriginalPak(struct menuitem *item); void filemgrRetrySave(s32 arg0); bool filemgrAttemptOperation(s32 device, bool closeonsuccess); -bool filemgrSaveOrLoad(struct fileguid *guid, s32 fileop, u32 playernum); +bool filemgrSaveOrLoad(struct fileguid *guid, s32 fileop, uintptr_t playernum); void filemgrDeleteCurrentFile(void); void func0f1097d0(s32 device); void filemgrSaveGameToDevice(s32 device); diff --git a/src/include/types.h b/src/include/types.h index da5d058b4..79f553fc9 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3816,7 +3816,7 @@ struct menudata_filemgr { /*0xe42*/ u8 fileop; union { void *unke44; - s32 mpplayernum; + intptr_t mpplayernum; }; /*0xe48*/ u32 fileid; /*0xe4c*/ u32 deviceserial;