* for loops seem to execute at least once? hm.
authorWilfried Göesgens <willi@citadel.org>
Wed, 16 Jan 2008 22:28:17 +0000 (22:28 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 16 Jan 2008 22:28:17 +0000 (22:28 +0000)
webcit/webcit.c

index 38c617c53fd0626719ea7fe45e8176fe3dd4c05c..424821dcefa9fd60a18c083be156657f2ca86b9a 100644 (file)
@@ -39,7 +39,8 @@ void unescape_input(char *buf)
                buflen --;
        }
 
-       for (a = 0; a < buflen; ++a) {
+       a = 0; 
+       while (a < buflen) {
                if (buf[a] == '+')
                        buf[a] = ' ';
                if (buf[a] == '%') {
@@ -53,6 +54,7 @@ void unescape_input(char *buf)
                        
                        buflen -=2;
                }
+               a++;
        }
 
 }