rasmus          Wed Apr  8 18:10:46 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/standard/tests/array   bug44929.phpt 

  Modified files:              
    /php-src/ext/standard       strnatcmp.c var_unserializer.c 
  Log:
  Fixed bug #44929 - Better handling of leading zeros
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/strnatcmp.c?r1=1.10&r2=1.10.8.1&diff_format=u
Index: php-src/ext/standard/strnatcmp.c
diff -u php-src/ext/standard/strnatcmp.c:1.10 
php-src/ext/standard/strnatcmp.c:1.10.8.1
--- php-src/ext/standard/strnatcmp.c:1.10       Thu Jul 15 01:26:03 2004
+++ php-src/ext/standard/strnatcmp.c    Wed Apr  8 18:10:46 2009
@@ -38,7 +38,7 @@
 
 #if 0
 static char const *version UNUSED =
-    "$Id: strnatcmp.c,v 1.10 2004/07/15 01:26:03 iliaa Exp $";
+    "$Id: strnatcmp.c,v 1.10.8.1 2009/04/08 18:10:46 rasmus Exp $";
 #endif
 /* {{{ compare_right
  */
@@ -116,10 +116,10 @@
                ca = *ap; cb = *bp;
 
                /* skip over leading spaces or zeros */
-               while (isspace((int)(unsigned char)ca))
+               while (isspace((int)(unsigned char)ca) || (ca == '0' && ap+1 < 
aend))
                        ca = *++ap;
 
-               while (isspace((int)(unsigned char)cb))
+               while (isspace((int)(unsigned char)cb) || (cb == '0' && bp+1 < 
bend))
                        cb = *++bp;
 
                /* process run of digits */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.70.2.4.2.7.2.10&r2=1.70.2.4.2.7.2.11&diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7.2.10 
php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7.2.11
--- php-src/ext/standard/var_unserializer.c:1.70.2.4.2.7.2.10   Tue Mar 17 
23:07:40 2009
+++ php-src/ext/standard/var_unserializer.c     Wed Apr  8 18:10:46 2009
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Tue Mar 17 15:55:10 2009 */
+/* Generated by re2c 0.13.5 on Wed Apr  8 09:34:35 2009 */
 #line 1 "ext/standard/var_unserializer.re"
 /*
   +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: var_unserializer.c,v 1.70.2.4.2.7.2.10 2009/03/17 23:07:40 felipe Exp 
$ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.7.2.11 2009/04/08 18:10:46 rasmus Exp 
$ */
 
 #include "php.h"
 #include "ext/standard/php_var.h"

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug44929.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/bug44929.phpt
+++ php-src/ext/standard/tests/array/bug44929.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to