Commit ab41ec31 authored by bar@noter.(none)'s avatar bar@noter.(none)

ctype-big5.c:

  additional fix for bug@10493, for sjis
ctype-cp932.c:
  additional fix for bug#10493, for cp932
parent 70506c67
...@@ -6285,7 +6285,7 @@ uint my_well_formed_len_big5(CHARSET_INFO *cs __attribute__((unused)), ...@@ -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 */ const char *emb= e - 1; /* Last possible end of an MB character */
*error= 0; *error= 0;
while (pos && b < e) while (pos-- && b < e)
{ {
if ((uchar) b[0] < 128) if ((uchar) b[0] < 128)
{ {
......
...@@ -5417,7 +5417,7 @@ uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)), ...@@ -5417,7 +5417,7 @@ uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)),
{ {
const char *b0= b; const char *b0= b;
*error= 0; *error= 0;
while (pos && b < e) while (pos-- && b < e)
{ {
/* /*
Cast to int8 for extra safety. Cast to int8 for extra safety.
......
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