Skip to content

Commit

Permalink
Prevent crash when copying player data
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenithMDC committed Dec 9, 2024
1 parent 2439eb6 commit c43f550
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/game/filemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/include/game/filemgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3816,7 +3816,7 @@ struct menudata_filemgr {
/*0xe42*/ u8 fileop;
union {
void *unke44;
s32 mpplayernum;
intptr_t mpplayernum;
};
/*0xe48*/ u32 fileid;
/*0xe4c*/ u32 deviceserial;
Expand Down

0 comments on commit c43f550

Please sign in to comment.