diff --git a/dlls/usp10/indic.c b/dlls/usp10/indic.c index 43bf0e53702..a25ceecb994 100644 --- a/dlls/usp10/indic.c +++ b/dlls/usp10/indic.c @@ -333,6 +333,8 @@ void Indic_ReorderCharacters( HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, L while((next < cChar) && lex(input[next]) == lex_Generic) next++; index = next; + if (next >= cChar) + break; next = Indic_process_next_syllable(input, cChar, 0, ¢er, index, lex); if (next != -1) {