summaryrefslogtreecommitdiff
path: root/strings/ctype-utf8.c
diff options
context:
space:
mode:
authorbar@mysql.com <>2004-10-21 12:17:59 +0500
committerbar@mysql.com <>2004-10-21 12:17:59 +0500
commite9fde8f54e1c54919a4763bb560317b4a4f85fdb (patch)
treeda7ea10d906d7cb39018bfc8fe3fc10f160850d1 /strings/ctype-utf8.c
parenteda3eb378d2d998b3899f91fedfc0017270178e6 (diff)
downloadmariadb-git-e9fde8f54e1c54919a4763bb560317b4a4f85fdb.tar.gz
Allow cp932 characters to be stored in a SJIS column
Diffstat (limited to 'strings/ctype-utf8.c')
-rw-r--r--strings/ctype-utf8.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index c08a1c0acfb..3ca6c5d279f 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2126,8 +2126,13 @@ int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t)
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
-
- if (s[0] >= 0)
+
+ /*
+ Cast to int8 for extra safety.
+ char can be unsigned by default
+ on some platforms.
+ */
+ if (((int8)s[0]) >= 0)
{
/*
s[0] is between 0 and 127.