diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2009-04-09 15:55:46 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2009-04-09 15:55:46 +0000 |
commit | cefbe2a8ebaeff6bd20640e6865ba5b055fc5198 (patch) | |
tree | 9af52594018d26c674d72dd22b398bf40376b506 | |
parent | 0e59140380404690b96167c5e6c485dbf88dfde9 (diff) | |
download | php-git-cefbe2a8ebaeff6bd20640e6865ba5b055fc5198.tar.gz |
Don't strip a leading 0 in a floating point number
-rw-r--r-- | ext/standard/strnatcmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ |