fix: glyph range size (#196)

* [API] Fix glyph array size

* [API] Fix macro multiple lines

* [API] Fix variable to use in ImFontAtlas

* [API] Fix counting of size in ImFontAtlas
This commit is contained in:
Kusaanko authored and GitHub committed 2023-08-28 14:49:11 +03:00
1 parent 7d545c3e27
commit 64416f1168
1 file changed
+4 -1
@@ -387,7 +387,10 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
/*JNI
#define RETURN_GLYPH_2_SHORT(glyphs) \
int size = sizeof(glyphs); \
const ImWchar* ranges = glyphs; \
int size = 0; \
for (; ranges[0]; ranges += 2) \
size += 2; \
jshortArray jShorts = env->NewShortArray(size); \
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
return jShorts;