From c8d25059b92978971631dccd7488b74284da2fb2 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 20 Jan 2024 20:04:22 +0100 Subject: [PATCH] fix: fix StringTableLoaderV3 not properly initializing cell indices --- src/ObjLoading/StringTable/StringTableLoader.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ObjLoading/StringTable/StringTableLoader.h b/src/ObjLoading/StringTable/StringTableLoader.h index fae42fc4c..d3e45ae92 100644 --- a/src/ObjLoading/StringTable/StringTableLoader.h +++ b/src/ObjLoading/StringTable/StringTableLoader.h @@ -130,6 +130,8 @@ namespace string_table } stringTable->cellIndex = static_cast(memory.Alloc(sizeof(int16_t) * cellCount)); + for (auto i = 0u; i < cellCount; i++) + stringTable->cellIndex[i] = i; std::sort(&stringTable->cellIndex[0], &stringTable->cellIndex[cellCount - 1],