diff --git a/src/r_patch.c b/src/r_patch.c index c78ffdd67..d6db44ea5 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -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]); diff --git a/src/r_things.c b/src/r_things.c index cdcc1877c..9032cd246 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -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);