summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bar@noter.(none)>2005-05-10 17:00:54 +0500
committerunknown <bar@noter.(none)>2005-05-10 17:00:54 +0500
commit5afb72220d81eac038c3345b7e7edd9823b973a9 (patch)
treeabea0cb65785247d4e30e2cc0aca89c2602945fb /strings
parentd4432343d1960199da9750696fc2953f36e3782b (diff)
downloadmariadb-git-5afb72220d81eac038c3345b7e7edd9823b973a9.tar.gz
ctype-big5.c:
additional fix for bug@10493, for sjis ctype-cp932.c: additional fix for bug#10493, for cp932 strings/ctype-cp932.c: additional fix for bug#10493, for cp932 strings/ctype-big5.c: additional fix for bug@10493, for sjis
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c2
-rw-r--r--strings/ctype-cp932.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 07b30205f89..52886116ff2 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6285,7 +6285,7 @@ uint my_well_formed_len_big5(CHARSET_INFO *cs __attribute__((unused)),
const char *emb= e - 1; /* Last possible end of an MB character */
*error= 0;
- while (pos && b < e)
+ while (pos-- && b < e)
{
if ((uchar) b[0] < 128)
{
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index 0db38afa1f7..d9e3bbd5866 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -5417,7 +5417,7 @@ uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)),
{
const char *b0= b;
*error= 0;
- while (pos && b < e)
+ while (pos-- && b < e)
{
/*
Cast to int8 for extra safety.