From c8469e94167f65baa9c087844f14f450671bd83a Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 23 Sep 2024 14:07:02 +0300 Subject: [PATCH] twn_textures.c: actually fix srcrect updating lol --- src/twn_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twn_textures.c b/src/twn_textures.c index ffd9fdc..5688a49 100644 --- a/src/twn_textures.c +++ b/src/twn_textures.c @@ -231,7 +231,7 @@ static bool update_rects(struct texture_cache *cache, stbrp_rect *rects, stbrp_r /* updates the atlas location of every rect in the cache */ static void update_texture_rects_in_atlas(struct texture_cache *cache, stbrp_rect *rects) { int r = 0; - for (size_t i = 0; i < arrlenu(rects); ++i) { + for (size_t i = 0; i < shlenu(cache->hash); ++i) { if (cache->hash[i].value.loner_texture != 0) continue;