]> granicus.if.org Git - php/commitdiff
Don't clober variables
authorIlia Alshanetsky <iliaa@php.net>
Mon, 24 Aug 2009 18:40:13 +0000 (18:40 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 24 Aug 2009 18:40:13 +0000 (18:40 +0000)
ext/standard/pack.c

index 9dd4f47a486bc71082fb4edb6814ed81e090eeed..d533b63d5e644de4967d436c9fc8861426c7be80 100644 (file)
@@ -708,15 +708,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) {