mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-31 00:45:24 -04:00
Fix sprintf buffer too small in dMsgObject_c::readMessageGroupLocal
This commit is contained in:
@@ -1602,7 +1602,10 @@ u8 dMsgObject_c::isSend() {
|
||||
}
|
||||
|
||||
void dMsgObject_c::readMessageGroupLocal(mDoDvdThd_mountXArchive_c** p_arcMount) {
|
||||
static char arcName[22];
|
||||
#if TARGET_PC
|
||||
static char arcName[32];
|
||||
#else
|
||||
#endif
|
||||
|
||||
int msgGroup = dStage_stagInfo_GetMsgGroup(dComIfGp_getStage()->getStagInfo());
|
||||
#if REGION_PAL
|
||||
@@ -1625,7 +1628,12 @@ void dMsgObject_c::readMessageGroupLocal(mDoDvdThd_mountXArchive_c** p_arcMount)
|
||||
#elif REGION_JPN
|
||||
sprintf(arcName, "/res/Msgjp/bmgres%d.arc", msgGroup);
|
||||
#else
|
||||
#if TARGET_PC
|
||||
// Original game UB
|
||||
snprintf(arcName, sizeof(arcName), "/res/Msgus/bmgres%d.arc", msgGroup);
|
||||
#else
|
||||
sprintf(arcName, "/res/Msgus/bmgres%d.arc", msgGroup);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
*p_arcMount = mDoDvdThd_mountXArchive_c::create(arcName, 0, JKRArchive::MOUNT_MEM, NULL);
|
||||
|
||||
Reference in New Issue
Block a user