]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fix bug where conditionals with multiple arguments caused an infinite loop.
authorBen Schmidt <none@none>
Tue, 24 Jan 2012 02:13:32 +0000 (13:13 +1100)
committerBen Schmidt <none@none>
Tue, 24 Jan 2012 02:13:32 +0000 (13:13 +1100)
src/prepstdreply.c

index f362a8c44b4aa12f7a58dfb63fd7d554dbca0a13..8db83a632d819878630e6fd3a8a08e1054de1438 100644 (file)
@@ -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;