rasmus          Thu Apr  9 15:55:46 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       strnatcmp.c 
  Log:
  Don't strip a leading 0 in a floating point number
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/strnatcmp.c?r1=1.10.8.1&r2=1.10.8.2&diff_format=u
Index: php-src/ext/standard/strnatcmp.c
diff -u php-src/ext/standard/strnatcmp.c:1.10.8.1 
php-src/ext/standard/strnatcmp.c:1.10.8.2
--- php-src/ext/standard/strnatcmp.c:1.10.8.1   Wed Apr  8 18:10:46 2009
+++ php-src/ext/standard/strnatcmp.c    Thu Apr  9 15:55:46 2009
@@ -38,7 +38,7 @@
 
 #if 0
 static char const *version UNUSED =
-    "$Id: strnatcmp.c,v 1.10.8.1 2009/04/08 18:10:46 rasmus Exp $";
+    "$Id: strnatcmp.c,v 1.10.8.2 2009/04/09 15:55: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) || (ca == '0' && ap+1 < 
aend))
+               while (isspace((int)(unsigned char)ca) || (ca == '0' && (ap+1 < 
aend) && (*(ap+1)!='.')))
                        ca = *++ap;
 
-               while (isspace((int)(unsigned char)cb) || (cb == '0' && bp+1 < 
bend))
+               while (isspace((int)(unsigned char)cb) || (cb == '0' && (bp+1 < 
bend) && (*(bp+1)!='.')))
                        cb = *++bp;
 
                /* process run of digits */



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

Reply via email to