]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
intel hex: flush input buffer after loading
authorLeo C <erbl259-lmu@yahoo.de>
Tue, 28 Apr 2015 17:14:23 +0000 (19:14 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Tue, 28 Apr 2015 17:14:23 +0000 (19:14 +0200)
avr/cmd_loadihex.c

index debccd7253ae5066d7941cfe558093833708a664..aaee064974e15371d2e5c389f1f38739be0787bc 100644 (file)
@@ -224,6 +224,10 @@ command_ret_t do_loadihex(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg
                break;
        }
 
+       /* flush input buffer */
+       while (my_getchar(0) > 0)
+               ;
+
        printf_P(PSTR("Data loaded: "));
        if (address_low >= MIN(address_high, address_max))
                printf_P(PSTR("None.\n"));