summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-sjis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 35182db3345..b018e148ffe 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4576,7 +4576,7 @@ uint my_well_formed_len_sjis(CHARSET_INFO *cs __attribute__((unused)),
{
const char *b0= b;
*error= 0;
- while (pos && b < e)
+ while (pos-- && b < e)
{
if ((uchar) b[0] < 128)
{