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:
1 parent
7d545c3e27
commit
64416f1168
1 file changed
+4
-1
@@ -387,7 +387,10 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
|||||||
|
|
||||||
/*JNI
|
/*JNI
|
||||||
#define RETURN_GLYPH_2_SHORT(glyphs) \
|
#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); \
|
jshortArray jShorts = env->NewShortArray(size); \
|
||||||
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
||||||
return jShorts;
|
return jShorts;
|
||||||
|
|||||||
Reference in new issue
Block a user