Some fixes for spritestuff2

This commit is contained in:
Jaime Ita Passos 2020-11-22 03:47:15 -03:00
parent e95a05880f
commit 071ec73389
2 changed files with 2 additions and 2 deletions

View file

@ -74,7 +74,7 @@ static void Patch_FreeData(patch_t *patch)
HWR_FreeTexture(patch);
#endif
for (i = 0; i < 2; i++)
for (i = 0; i < 4; i++)
{
if (patch->flats[i])
Z_Free(patch->flats[i]);

View file

@ -296,7 +296,7 @@ boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16
if (!isPNG)
#endif
{
W_ReadLumpHeaderPwad(wadnum, l, &patch, sizeof (patch_t), 0);
W_ReadLumpHeaderPwad(wadnum, l, &patch, sizeof(INT16) * 4, 0);
width = SHORT(patch.width);
height = SHORT(patch.height);
topoffset = SHORT(patch.topoffset);