From 1692efa5a92265e6889b2ae7673554cb7a926afb Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 14 Aug 2025 16:19:05 +0200 Subject: [PATCH] dont need to realloc this didnt see when i added realloc everywhere this doesent need to keep old data --- src/hardware/hw_batching.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 3b5c5426e..28b568c54 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -99,7 +99,8 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt polygonArrayAllocSize *= 2; polygonArray = realloc(polygonArray, polygonArrayAllocSize * sizeof(PolygonArrayEntry)); // also need to redo the index array, dont need to copy it though - polygonArraySorted = realloc(polygonArraySorted, polygonArrayAllocSize * sizeof(PolygonArrayEntry*)); + free(polygonArraySorted); + polygonArraySorted = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry *)); } while (unsortedVertexArraySize + (int)iNumPts > unsortedVertexArrayAllocSize)