diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2009-07-21 21:15:48 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2009-07-21 21:15:48 +0000 |
commit | 7bba051009490d1a1c209c93bb560745b45ef89a (patch) | |
tree | dbea652aa4fec3395533a5087cca4daac53e116d /ext/standard/strnatcmp.c | |
parent | 27dccf7ac08164122b82456fcb7885a66540801c (diff) | |
download | php-git-7bba051009490d1a1c209c93bb560745b45ef89a.tar.gz |
Fix bug #49003 by tweaking the fix to bug #44929 slightly.
A 0 followed by any punctuation is now significant instead
of just 0's in front of a period.
Diffstat (limited to 'ext/standard/strnatcmp.c')
-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 366c12449f..c3a8a82010 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) && (*(ap+1)!='.'))) + while (isspace((int)(unsigned char)ca) || (ca == '0' && (ap+1 < aend) && !ispunct(*(ap+1)))) ca = *++ap; - while (isspace((int)(unsigned char)cb) || (cb == '0' && (bp+1 < bend) && (*(bp+1)!='.'))) + while (isspace((int)(unsigned char)cb) || (cb == '0' && (bp+1 < bend) && !ispunct(*(bp+1)))) cb = *++bp; /* process run of digits */ |