noooo dont free our lumppat

for some reason this occasioncally causes an use after free??
our memory management honestly is a fucking mess ngl
This commit is contained in:
Alug committed 2025-04-15 04:59:38 +02:00
1 parent 8a80f0571c
commit a6bebb2d91
1 file changed
+1 -4
+1 -4
View File
@@ -554,7 +554,7 @@ patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spri
if (lump == LUMPERROR)
return NULL;
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
patch = (patch_t *)W_CachePatchNum(lump, PU_CACHE); // PU_LEVEL
if (sprinfo->available)
{
@@ -568,9 +568,6 @@ patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spri
}
RotatedPatch_DoRotation(rotsprite, patch, rotationangle, xpivot, ypivot, flip);
// free image data
Z_Free(patch);
}
return rotsprite->patches[idx];