cvs: php-src(PHP_4_3) /ext/ctype ctype.c

From: Date: Tue, 20 Jul 2004 20:10:04 +0000
Subject: cvs: php-src(PHP_4_3) /ext/ctype ctype.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-27929@lists.php.net to get a copy of this message
moriyoshi Tue Jul 20 16:10:04 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/ctype ctype.c Log: - MFH (ctype.c: 1.31): Correct range checks. - MFH (ctype.c: 1.31): Normalize negative values. http://cvs.php.net/diff.php/php-src/ext/ctype/ctype.c?r1=1.23.4.3&r2=1.23.4.4&ty=u Index: php-src/ext/ctype/ctype.c diff -u php-src/ext/ctype/ctype.c:1.23.4.3 php-src/ext/ctype/ctype.c:1.23.4.4 --- php-src/ext/ctype/ctype.c:1.23.4.3 Mon Jul 19 21:03:34 2004 +++ php-src/ext/ctype/ctype.c Tue Jul 20 16:10:04 2004 @@ -97,9 +97,11 @@ return; \ switch (Z_TYPE_P(c)) { \ case IS_LONG: \ - if (Z_LVAL_P(c) < 255 && Z_LVAL_P(c) > -127) { \ + 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) { \ + RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \ + } \ SEPARATE_ZVAL(&c); \ convert_to_string(c); \ case IS_STRING: \

« previous php.cvs (#27929) next »