From: Rasmus Lerdorf Date: Thu, 9 Apr 2009 15:55:46 +0000 (+0000) Subject: Don't strip a leading 0 in a floating point number X-Git-Tag: php-5.3.0RC2~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cefbe2a8ebaeff6bd20640e6865ba5b055fc5198;p=php Don't strip a leading 0 in a floating point number --- diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index dbed3c71cc..2459e46e66 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -116,10 +116,10 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len 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 */