From: Rasmus Lerdorf Date: Mon, 28 Sep 2009 13:29:53 +0000 (+0000) Subject: Fix for bug #49698 X-Git-Tag: php-5.4.0alpha1~191^2~2571 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4c8961b14a0aaa86681c1989eddf6f51927c8fc;p=php Fix for bug #49698 --- diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index b756a86afb..0c3c23d58b 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -112,12 +112,12 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len while (1) { ca = a[ai]; cb = b[bi]; - /* skip over leading zeros unless they are followed by punctuation */ - while (leading && ca == '0' && (ai+1 < a_len) && !ispunct(a[ai+1])) { + /* skip over leading zeros */ + while (leading && ca == '0' && (ai+1 < a_len) && isdigit(a[ai+1])) { ca = a[++ai]; } - while (leading && cb == '0' && (bi+1 < b_len) && !ispunct(b[bi+1])) { + while (leading && cb == '0' && (bi+1 < b_len) && isdigit(a[ai+1])) { cb = b[++bi]; }