summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-win1250ch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 244cfdc9b3c..27e6a94f67b 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -503,12 +503,12 @@ my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
- for (;;)
+ while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
- if (totlen <= len && ((1 << pass) & flags))
+ if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)