From: Wilfried Göesgens Date: Wed, 16 Jan 2008 22:28:17 +0000 (+0000) Subject: * for loops seem to execute at least once? hm. X-Git-Tag: v7.86~2589 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=560b4192815124e9f4150b3703980c5e2c8671b5;p=citadel.git * for loops seem to execute at least once? hm. --- diff --git a/webcit/webcit.c b/webcit/webcit.c index 38c617c53..424821dce 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -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++; } }