Module: wine
Branch: master
Commit: e2d4cf9e29ee98d33ebdc4aba3ccd8d9cb592661
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e2d4cf9e29ee98d33ebdc4aba…
Author: Aric Stewart <aric(a)codeweavers.com>
Date: Fri Jan 27 11:31:44 2017 -0600
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 <aric(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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 9a74fcc..a9aa4f4 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;