Module: wine Branch: master Commit: 4dffb0aa430bb240b6bc337a139dd6dafd69a139 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4dffb0aa430bb240b6bc337a13...
Author: Aric Stewart aric@codeweavers.com Date: Tue Dec 6 08:48:20 2011 -0600
usp10: The top logclust value may be different than the number of chars.
---
dlls/usp10/shape.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 8706fad..8837213 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1359,6 +1359,7 @@ static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int ch int target_index = -1; int replacing_glyph = -1; int changed = 0; + int top_logclust = 0;
if (changeCount > 0) { @@ -1369,6 +1370,9 @@ static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int ch }
seeking_glyph = target_glyph; + for (i = 0; i < chars; i++) + if (pwLogClust[i] > top_logclust) + top_logclust = pwLogClust[i];
do { if (write_dir > 0) @@ -1392,7 +1396,7 @@ static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int ch if (target_index == -1) seeking_glyph ++; } - while (target_index == -1 && seeking_glyph < chars); + while (target_index == -1 && seeking_glyph <= top_logclust);
if (target_index == -1) {