summaryrefslogtreecommitdiff
path: root/ext/standard/strnatcmp.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2009-09-28 13:29:53 +0000
committerRasmus Lerdorf <rasmus@php.net>2009-09-28 13:29:53 +0000
commitb3de24c9b87caf9b859ac2c6af152738e5bc1ef4 (patch)
tree25748d15518dccca449f764add4cdc77cf5b4fd5 /ext/standard/strnatcmp.c
parent91315a93073b8d591e0beedb5866676125c90066 (diff)
downloadphp-git-b3de24c9b87caf9b859ac2c6af152738e5bc1ef4.tar.gz
Fix for bug #49698
Diffstat (limited to 'ext/standard/strnatcmp.c')
-rw-r--r--ext/standard/strnatcmp.c6
1 files changed, 3 insertions, 3 deletions
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;
}