summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ctype/ctype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index b16324042d..78f6d293e3 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -99,7 +99,7 @@ PHP_MINFO_FUNCTION(ctype)
case IS_LONG: \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
- } else if (Z_LVAL_P(c) >= -128) { \
+ } else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
} \
SEPARATE_ZVAL(&c); \