Don't trash memory when reading saved PWR

This commit is contained in:
AJ Martinez 2023-06-01 21:46:54 -07:00
parent 957453d02f
commit c716a27454
2 changed files with 2 additions and 2 deletions

View file

@ -4060,7 +4060,7 @@ const char *name3, uint8_t *key3, UINT16 *pwr3,
const char *name4, uint8_t *key4, UINT16 *pwr4)
{
INT32 n, newplayernum, i;
UINT8 buf[4 + MAXPLAYERNAME + PUBKEYLENGTH + MAXAVAILABILITY];
UINT8 buf[4 + MAXPLAYERNAME + PUBKEYLENGTH + MAXAVAILABILITY + sizeof(((serverplayer_t *)0)->powerlevels)];
UINT8 *buf_p = buf;
boolean newplayer = false;

View file

@ -5299,7 +5299,7 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending)
WRITEUINT32(save->p, cht_debug);
}
static inline boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
{
size_t i, j;
size_t numTasks;