andrei Wed Apr 8 20:12:28 2009 UTC
Modified files:
/php-src/ext/standard strnatcmp.c
Log:
Fix Rasmus's patch for bug #44929.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/strnatcmp.c?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/standard/strnatcmp.c
diff -u php-src/ext/standard/strnatcmp.c:1.13
php-src/ext/standard/strnatcmp.c:1.14
--- php-src/ext/standard/strnatcmp.c:1.13 Wed Apr 8 18:18:49 2009
+++ php-src/ext/standard/strnatcmp.c Wed Apr 8 20:12:27 2009
@@ -38,7 +38,7 @@
#if 0
static char const *version UNUSED =
- "$Id: strnatcmp.c,v 1.13 2009/04/08 18:18:49 rasmus Exp $";
+ "$Id: strnatcmp.c,v 1.14 2009/04/08 20:12:27 andrei Exp $";
#endif
/* {{{ compare_right
*/
@@ -112,10 +112,10 @@
ca = a[ai]; cb = b[bi];
/* skip over leading spaces or zeros */
- while (isspace((int)(unsigned char)ca) || (ca == '0' && ap+1 <
aend))
+ while (isspace((int)(unsigned char)ca) || (ca == '0' && ai+1 <
a_len))
ca = a[++ai];
- while (isspace((int)(unsigned char)cb) || (cb == '0' && bp+1 <
bend))
+ while (isspace((int)(unsigned char)cb) || (cb == '0' && bi+1 <
b_len))
cb = b[++bi];
/* process run of digits */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php