From: Rasmus Lerdorf Date: Mon, 28 Sep 2009 13:29:53 +0000 (+0000) Subject: Fix for bug #49698 X-Git-Tag: php-5.2.12RC1~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5803d3b029770572ec8877f90f7d5fad22bd0aa5;p=php Fix for bug #49698 --- diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index a071fd186f..face191a6e 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -116,12 +116,12 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len while (1) { ca = *ap; cb = *bp; - /* skip over leading zeros unless they are followed by punctuation */ - while (leading && ca == '0' && (ap+1 < aend) && !ispunct(*(ap+1))) { + /* skip over leading zeros */ + while (leading && ca == '0' && (ap+1 < aend) && isdigit(*(ap+1))) { ca = *++ap; } - while (leading && cb == '0' && (bp+1 < bend) && !ispunct(*(bp+1))) { + while (leading && cb == '0' && (bp+1 < bend) && isdigit(*(bp+1))) { cb = *++bp; }