Commit cdca3018 authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

gdi32: Fix runaway loop because of unsigned comparison in BIDI_Reorder.

parent 74cd5903
...@@ -1087,7 +1087,7 @@ BOOL BIDI_Reorder( ...@@ -1087,7 +1087,7 @@ BOOL BIDI_Reorder(
i = done = 0; i = done = 0;
while (done < uCount) while (done < uCount)
{ {
unsigned j, lastgood; unsigned j;
classify(lpOutString + done, chartype, uCount - done); classify(lpOutString + done, chartype, uCount - done);
/* limit text to first block */ /* limit text to first block */
i = resolveParagraphs(chartype, uCount - done); i = resolveParagraphs(chartype, uCount - done);
...@@ -1140,7 +1140,7 @@ BOOL BIDI_Reorder( ...@@ -1140,7 +1140,7 @@ BOOL BIDI_Reorder(
if (lpOrder) if (lpOrder)
{ {
unsigned k; int k, lastgood;
for (j = lastgood = 0; j < i; ++j) for (j = lastgood = 0; j < i; ++j)
if (levels[j] != levels[lastgood]) if (levels[j] != levels[lastgood])
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment