From: Ben Schmidt Date: Tue, 24 Jan 2012 02:13:32 +0000 (+1100) Subject: Fix bug where conditionals with multiple arguments caused an infinite loop. X-Git-Tag: RELEASE_1_2_18a1~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=153a1b8840cc394fd1dbc090a9c9f45e75bff167;p=thirdparty%2Fmlmmj.git Fix bug where conditionals with multiple arguments caused an infinite loop. --- diff --git a/src/prepstdreply.c b/src/prepstdreply.c index f362a8c4..8db83a63 100644 --- a/src/prepstdreply.c +++ b/src/prepstdreply.c @@ -669,10 +669,10 @@ static int handle_conditional(text *txt, char **line_p, char **pos_p, conditional *cond; if (txt->skip == NULL) { + pos = token; for (;;) { if (*token == '\0') break; - for (pos = token; - *pos != '\0' && (!multi || *pos != ' '); + for (; *pos != '\0' && (!multi || *pos != ' '); pos++) { if(*pos >= '0' && *pos <= '9') continue; if(*pos >= 'A' && *pos <= 'Z') continue;