From ded5ad8a8ce3acfc85d6c4da834013b333acf986 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 21 Oct 2013 20:23:39 +0200 Subject: [PATCH] wineconsole: Avoid an empty for loop. --- programs/wineconsole/dialog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c index d69432e2d99..8ca656353a8 100644 --- a/programs/wineconsole/dialog.c +++ b/programs/wineconsole/dialog.c @@ -369,12 +369,13 @@ static int CALLBACK font_enum_size(const LOGFONTW* lf, const TEXTMETRICW* tm, if (WCUSER_ValidateFontMetric(di->data, tm, FontType)) { - int idx; + int idx = 0; /* we want the string to be sorted with a numeric order, not a lexicographic... * do the job by hand... get where to insert the new string */ - for (idx = 0; idx < di->nFont && tm->tmHeight > di->font[idx].height; idx++); + while (idx < di->nFont && tm->tmHeight > di->font[idx].height) + idx++; while (idx < di->nFont && tm->tmHeight == di->font[idx].height && tm->tmWeight > di->font[idx].weight) -- 2.11.4.GIT