summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_charset.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2011-05-09 16:20:35 +0000
committerAndrey Hristov <andrey@php.net>2011-05-09 16:20:35 +0000
commit6242101f2badcb14f4d00c27c4eceaf773dd9243 (patch)
treeff01981144620fc68a7aa9c871e311b8b12dacc3 /ext/mysqlnd/mysqlnd_charset.c
parent4a8eeb7afb0bfc31cee1f06b2457c44120052bca (diff)
downloadphp-git-6242101f2badcb14f4d00c27c4eceaf773dd9243.tar.gz
Fix for bug 54674..typo in the check of SJIS
Diffstat (limited to 'ext/mysqlnd/mysqlnd_charset.c')
-rw-r--r--ext/mysqlnd/mysqlnd_charset.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c
index 0e1b387a5f..a75861ccae 100644
--- a/ext/mysqlnd/mysqlnd_charset.c
+++ b/ext/mysqlnd/mysqlnd_charset.c
@@ -325,11 +325,9 @@ static unsigned int mysqlnd_mbcharlen_gbk(unsigned int gbk)
/* }}} */
-/* {{{ sjis functions */
-#define valid_sjis_head(c) ((0x81 <= (c) && (c) <= 0x9F) && \
- (0xE0 <= (c) && (c) <= 0xFC))
-#define valid_sjis_tail(c) ((0x40 <= (c) && (c) <= 0x7E) && \
- (0x80 <= (c) && (c) <= 0x7C))
+/* {{{ functions */
+#define valid_sjis_head(c) ((0x81 <= (c) && (c) <= 0x9F) || (0xE0 <= (c) && (c) <= 0xFC))
+#define valid_sjis_tail(c) ((0x40 <= (c) && (c) <= 0x7E) || (0x80 <= (c) && (c) <= 0x7C))
static unsigned int check_mb_sjis(const char *start, const char *end)