usp10: pwLogClust is ordered so its max will be on one end.

This commit is contained in:
Aric Stewart 2012-01-30 07:30:05 -06:00 committed by Alexandre Julliard
parent 1967fae847
commit 2ab625bf2f
1 changed files with 5 additions and 7 deletions

View File

@ -2309,16 +2309,14 @@ static inline int get_cluster_size(const WORD *pwLogClust, int cChars, int item,
static inline int get_glyph_cluster_advance(const int* piAdvance, const SCRIPT_VISATTR *pva, const WORD *pwLogClust, int cGlyphs, int cChars, int glyph, int direction)
{
int advance;
int log_clust_max = 0;
int i;
int log_clust_max;
advance = piAdvance[glyph];
for (i = 0; i < cChars; i++)
{
if (pwLogClust[i] > log_clust_max)
log_clust_max = pwLogClust[i];
}
if (pwLogClust[0] > pwLogClust[cChars-1])
log_clust_max = pwLogClust[0];
else
log_clust_max = pwLogClust[cChars-1];
if (glyph > log_clust_max)
return advance;