Get output buffer size in W_ReadShader correctly

This commit is contained in:
Eidolon 2025-07-17 18:44:48 -05:00
parent 4c65960095
commit ced6293d37

View file

@ -2581,7 +2581,7 @@ boolean W_ReadShader(const char *filename, size_t *size, void *dest)
int zErr; // Helper var.
z_stream strm;
unsigned long rawSize = lump->disksize;
unsigned long decSize = (unsigned long)size;
unsigned long decSize = (unsigned long)*size;
rawData = static_cast<UINT8*>(Z_Malloc(rawSize, PU_STATIC, NULL));
decData = static_cast<UINT8*>(dest);