usp10: Check bounds before checking value in array.

This commit is contained in:
Aric Stewart 2012-05-25 07:55:19 -05:00 committed by Alexandre Julliard
parent 30fc8a553d
commit 1f4554d141
1 changed files with 2 additions and 2 deletions

View File

@ -628,9 +628,9 @@ static void UpdateClustersFromGlyphProp(const int cGlyphs, const int cChars, WOR
if (pwLogClust[j] == i)
{
int k = j;
while (!pGlyphProp[pwLogClust[k]].sva.fClusterStart && k >= 0 && k <cChars)
while (k >= 0 && k <cChars && !pGlyphProp[pwLogClust[k]].sva.fClusterStart)
k-=1;
if (pGlyphProp[pwLogClust[k]].sva.fClusterStart)
if (k >= 0 && k <cChars && pGlyphProp[pwLogClust[k]].sva.fClusterStart)
pwLogClust[j] = pwLogClust[k];
}
}