From: Andrei Zmievski Date: Wed, 8 Apr 2009 20:12:27 +0000 (+0000) Subject: Fix Rasmus's patch for bug #44929. X-Git-Tag: php-5.4.0alpha1~191^2~3947 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11960bfb40b30bdce5ca55872b15bbfb4ddc7e74;p=php Fix Rasmus's patch for bug #44929. --- diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index 5b05c65299..c9ab26f69d 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -112,10 +112,10 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len ca = a[ai]; cb = b[bi]; /* skip over leading spaces or zeros */ - while (isspace((int)(unsigned char)ca) || (ca == '0' && ap+1 < aend)) + while (isspace((int)(unsigned char)ca) || (ca == '0' && ai+1 < a_len)) ca = a[++ai]; - while (isspace((int)(unsigned char)cb) || (cb == '0' && bp+1 < bend)) + while (isspace((int)(unsigned char)cb) || (cb == '0' && bi+1 < b_len)) cb = b[++bi]; /* process run of digits */