diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index d30a615e597..91637d1966c 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -931,7 +931,7 @@ static void mark_invalid_combinations(HDC hdc, const WCHAR* pwcChars, INT cChars context_type[i] = lex(pwcChars[i]); GetGlyphIndicesW(hdc, &invalid, 1, &invalid_glyph, 0); - for (i = 1, g=1; i < cChars; i++, g++) + for (i = 1, g=1; i < cChars - 1; i++, g++) { if (context_type[i] != 0 && context_type[i+write_dir]==context_type[i]) {