diff options
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/locale/locale.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdlib/local.h | 2 | ||||
-rw-r--r-- | newlib/libc/stdlib/sb_charsets.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index 19159fbca..a01b312f8 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -624,6 +624,7 @@ loadlocale(struct _reent *p, int category) strcpy (charset, "CP21866"); else return NULL; + mbc_max = 1; #ifdef _MB_CAPABLE #ifdef _MB_EXTENDED_CHARSETS_WINDOWS l_wctomb = __cp_wctomb; diff --git a/newlib/libc/stdlib/local.h b/newlib/libc/stdlib/local.h index 93a3b4b8e..12e6998c1 100644 --- a/newlib/libc/stdlib/local.h +++ b/newlib/libc/stdlib/local.h @@ -60,7 +60,7 @@ int __big5_mbtowc (struct _reent *, wchar_t *, const char *, size_t, extern wchar_t __iso_8859_conv[14][0x60]; int __iso_8859_index (const char *); -extern wchar_t __cp_conv[12][0x80]; +extern wchar_t __cp_conv[][0x80]; int __cp_index (const char *); #endif diff --git a/newlib/libc/stdlib/sb_charsets.c b/newlib/libc/stdlib/sb_charsets.c index 03c92064c..dce4855d7 100644 --- a/newlib/libc/stdlib/sb_charsets.c +++ b/newlib/libc/stdlib/sb_charsets.c @@ -625,7 +625,7 @@ __micro_atoi (const char *s) return -1; while (*s) { - if (*s < '0' || *s > '9' || ret >= 10000) + if (*s < '0' || *s > '9' || ret >= 100000) return -1; ret = 10 * ret + (*s++ - '0'); } |