Skip to content

Commit

Permalink
Fix for bug #49698
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Sep 28, 2009
1 parent 91315a9 commit b3de24c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/standard/strnatcmp.c
Expand Up @@ -116,12 +116,12 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len
while (1) { while (1) {
ca = *ap; cb = *bp; ca = *ap; cb = *bp;


/* skip over leading zeros unless they are followed by punctuation */ /* skip over leading zeros */
while (leading && ca == '0' && (ap+1 < aend) && !ispunct(*(ap+1))) { while (leading && ca == '0' && (ap+1 < aend) && isdigit(*(ap+1))) {
ca = *++ap; ca = *++ap;
} }


while (leading && cb == '0' && (bp+1 < bend) && !ispunct(*(bp+1))) { while (leading && cb == '0' && (bp+1 < bend) && isdigit(*(bp+1))) {
cb = *++bp; cb = *++bp;
} }


Expand Down

0 comments on commit b3de24c

Please sign in to comment.