]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
cli.c: The real bugfix for Comment only lines.
authorLeo C <erbl259-lmu@yahoo.de>
Sun, 29 Jul 2018 07:28:08 +0000 (09:28 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Sun, 29 Jul 2018 07:28:08 +0000 (09:28 +0200)
avr/cli.c

index b47603a7841c5841a32a625f3c341e579ca1243b..7c452511d0642b732c94befd0c0f61a1cbaf11d8 100644 (file)
--- a/avr/cli.c
+++ b/avr/cli.c
@@ -309,6 +309,10 @@ static int cli_run_command(const char *cmd, uint_fast8_t flag)
                } else {
                        str = sep;                      /* no more commands for next pass */
                }
+               while (isblank(*token))
+                       ++token;
+               if (*token == '\0')             /* empty (comment only) */
+                       continue;
                debug_parser("token: \"%s\"\n", token);
 
                /* find macros in this token and replace them */