From: Ilia Alshanetsky Date: Mon, 24 Aug 2009 18:40:13 +0000 (+0000) Subject: Don't clober variables X-Git-Tag: php-5.4.0alpha1~191^2~2769 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45700b1c69802f962c7b3e3c2a732c0cbee26359;p=php Don't clober variables --- diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 349977f5ad..98319d18d9 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -686,15 +686,15 @@ PHP_FUNCTION(unpack) buf = emalloc(len + 1); for (ipos = opos = 0; opos < len; opos++) { - char c = (input[inputpos + ipos] >> nibbleshift) & 0xf; + char cc = (input[inputpos + ipos] >> nibbleshift) & 0xf; - if (c < 10) { - c += '0'; + if (cc < 10) { + cc += '0'; } else { - c += 'a' - 10; + cc += 'a' - 10; } - buf[opos] = c; + buf[opos] = cc; nibbleshift = (nibbleshift + 4) & 7; if (first-- == 0) {