Merge branch 'fix-pwr-buffer' into 'master'

Don't trash memory when reading saved PWR

See merge request KartKrew/Kart!1266
This commit is contained in:
toaster 2023-06-02 09:08:50 +00:00
commit b195d43577
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

@ -5303,7 +5303,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;