Skip to content

Commit 037ec09

Browse files
committed
Fixed unpackaging of Japanese glyphs ranges
1 parent 168a811 commit 037ec09

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

imgui.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7429,20 +7429,19 @@ const ImWchar* ImFontAtlas::GetGlyphRangesJapanese()
74297429
109,2,18,23,0,0,9,61,3,0,28,41,77,27,19,17,81,5,2,14,5,83,57,252,14,154,263,14,20,8,13,6,57,39,38,
74307430
};
74317431
static int ranges_unpacked = false;
7432-
static ImWchar ranges[10 + 1 + IM_ARRAYSIZE(offsets_from_0x4E00)*2] =
7432+
static ImWchar ranges[10 + IM_ARRAYSIZE(offsets_from_0x4E00)*2 + 1] =
74337433
{
74347434
0x0020, 0x00FF, // Basic Latin + Latin Supplement
74357435
0x3000, 0x3000, // Ideographic Space
74367436
0x3040, 0x30FF, // Hiragana, Katakana
74377437
0x31F0, 0x31FF, // Katakana Phonetic Extensions
74387438
0xFF00, 0xFFEF, // Half-width characters
7439-
0,
74407439
};
74417440
if (!ranges_unpacked)
74427441
{
74437442
// Unpack
74447443
int codepoint = 0x4e00;
7445-
ImWchar* dst = &ranges[6];
7444+
ImWchar* dst = &ranges[10];
74467445
for (int n = 0; n < IM_ARRAYSIZE(offsets_from_0x4E00); n++, dst += 2)
74477446
dst[0] = dst[1] = (ImWchar)(codepoint += (offsets_from_0x4E00[n] + 1));
74487447
dst[0] = 0;

0 commit comments

Comments
 (0)