Merge branch 'archiveworld-sigsegv-fix' into 'master'

Fix SIGSEGV from sending lindefs/sidedefs in savegame

See merge request KartKrew/Kart-Public!99
This commit is contained in:
wolfs 2019-03-07 01:18:38 -05:00
commit 7dc1d163be

View file

@ -677,6 +677,8 @@ static void P_NetArchiveWorld(void)
mld = W_CacheLumpNum(lastloadedmaplumpnum+ML_LINEDEFS, PU_CACHE); mld = W_CacheLumpNum(lastloadedmaplumpnum+ML_LINEDEFS, PU_CACHE);
msd = W_CacheLumpNum(lastloadedmaplumpnum+ML_SIDEDEFS, PU_CACHE); msd = W_CacheLumpNum(lastloadedmaplumpnum+ML_SIDEDEFS, PU_CACHE);
if (mld && msd)
{
// do lines // do lines
for (i = 0; i < numlines; i++, mld++, li++) for (i = 0; i < numlines; i++, mld++, li++)
{ {
@ -757,6 +759,7 @@ static void P_NetArchiveWorld(void)
WRITEINT32(put, si->midtexture); WRITEINT32(put, si->midtexture);
} }
} }
}
WRITEUINT16(put, 0xffff); WRITEUINT16(put, 0xffff);
R_ClearTextureNumCache(false); R_ClearTextureNumCache(false);