Fix GetGlyphIndices returning array of 0 on hl

Previously, the first for loop would reach the end of the characters, so
no further characters were read in the second loop. This meant that the
array remained filled with 0 values.
This commit is contained in:
Tobiasz Laskowski
2025-03-11 01:13:28 +00:00
parent 99209da430
commit 6283017adb

View File

@@ -1064,6 +1064,7 @@ namespace lime {
unsigned long character;
int index;
int count = 0;
const char* characters_start = characters;
// TODO: Determine array size first
@@ -1076,6 +1077,7 @@ namespace lime {
hl_varray* indices = (hl_varray*)hl_alloc_array (&hlt_i32, count);
int* indicesData = hl_aptr (indices, int);
characters = characters_start;
while (*characters != 0) {