From 3913ffeac2cb7895629d01907622341ec5aec8f4 Mon Sep 17 00:00:00 2001 From: Bigfoot71 Date: Sat, 17 May 2025 18:17:29 +0200 Subject: [PATCH] fix texture pool alloc.. --- src/external/rlsw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/external/rlsw.h b/src/external/rlsw.h index 8f0f0308d..399931343 100644 --- a/src/external/rlsw.h +++ b/src/external/rlsw.h @@ -3787,10 +3787,10 @@ bool swInit(int w, int h) swViewport(0, 0, w, h); swScissor(0, 0, w, h); - RLSW.loadedTextures = SW_MALLOC(SW_MAX_TEXTURES); + RLSW.loadedTextures = SW_MALLOC(SW_MAX_TEXTURES * sizeof(sw_texture_t)); if (RLSW.loadedTextures == NULL) { swClose(); return false; } - RLSW.freeTextureIds = SW_MALLOC(SW_MAX_TEXTURES); + RLSW.freeTextureIds = SW_MALLOC(SW_MAX_TEXTURES * sizeof(uint32_t)); if (RLSW.loadedTextures == NULL) { swClose(); return false; } RLSW.clearColor[0] = 0.0f;