]> git.tue.mpg.de Git - tfortune.git/commitdiff
com_help(): Fix comma placement.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 13 May 2018 17:23:33 +0000 (19:23 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 20 Jan 2019 11:06:02 +0000 (12:06 +0100)
We never want to print a comma at the beginning of the line.

tfortune.c

index 0768976bfb83e8519aa29eab9ce40dfbb16a6413..29243fc764f02533e7390e585a45d1f8b74d51d1 100644 (file)
@@ -930,11 +930,11 @@ static void show_subcommand_summary(bool verbose)
                for (i = 0; i < LSG_NUM_TFORTUNE_SUBCOMMANDS; i++) {
                        if (i > 0)
                                n += printf(", ");
-                       n += printf("%s", subcommand_names[i]);
                        if (n > 70) {
                                printf("\n\t");
                                n = 8;
                        }
+                       n += printf("%s", subcommand_names[i]);
                }
                printf("\n");
        }