Fix logging: don't skip the first argument when substituting mode changes
authorkroseneg@schmidham.net <kroseneg@schmidham.net>
Thu, 7 Oct 2010 04:41:08 +0000 (06:41 +0200)
committerkroseneg@schmidham.net <kroseneg@schmidham.net>
Thu, 7 Oct 2010 04:41:08 +0000 (06:41 +0200)
src/log_subst.c

index 01d8154..cde4c60 100644 (file)
@@ -152,7 +152,7 @@ static char *get_modechanges(struct subst_context *subst_ctx, const struct irc_l
        char buf[512] = "";
        int i;
 
-       for (i = 3 ; i+1 < line->argc && line->args[i+1] != NULL; i++) {
+       for (i = 3 ; i < line->argc && line->args[i] != NULL; i++) {
                if (i > 3) strncat(buf, " ", sizeof(buf)-1);
                strncat(buf, line->args[i], sizeof(buf)-1);
        }