From e2d4cf9e29ee98d33ebdc4aba3ccd8d9cb592661 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 27 Jan 2017 11:31:44 -0600 Subject: [PATCH] usp10: Fix next index for RTL MultipleSubst. MultipleSubst will expand the glyph array to the right, so when the writing direction is RTL the next index does not need to be modified by the new count of glyphs. Signed-off-by: Aric Stewart Signed-off-by: Alexandre Julliard --- dlls/usp10/opentype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 9a74fcce4ec..a9aa4f4ac6a 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -940,7 +940,10 @@ static INT GSUB_apply_MultipleSubst(const OT_LookupTable *look, WORD *glyphs, IN TRACE("\n"); } - return glyph_index + (sub_count * write_dir); + if (write_dir > 0) + return glyph_index + sub_count; + else + return glyph_index - 1; } } return GSUB_E_NOGLYPH;