Merge branch 'fix-ghost-netvar-crash' into 'next'

Fix G_GhostTicker crashing trying to read netvars as ghost data

See merge request STJr/SRB2!1203
This commit is contained in:
James R 2020-10-23 16:37:49 -04:00
commit 5f772c1850

View file

@ -625,7 +625,7 @@ void G_ConsGhostTic(void)
if (followtic & FZT_SCALE)
demo_p += sizeof(fixed_t);
// momx, momy and momz
demo_p += (demoversion < 0x000e) ? sizeof(UINT16) * 3 : sizeof(fixed_t) * 3;
demo_p += (demoversion < 0x000e) ? sizeof(INT16) * 3 : sizeof(fixed_t) * 3;
if (followtic & FZT_SKIN)
demo_p++;
demo_p += sizeof(UINT16);
@ -2163,7 +2163,7 @@ void G_AddGhost(char *defdemoname)
count = READUINT16(p);
while (count--)
{
p += 2;
SKIPSTRING(p);
SKIPSTRING(p);
p++;
}