X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/d9d8de47e56b7c418b57aaff8534e7e939754802..fcd2239eb2849432269ba4456718b657fdff3972:/avr/debug.c diff --git a/avr/debug.c b/avr/debug.c index e29a085..e38ccb2 100644 --- a/avr/debug.c +++ b/avr/debug.c @@ -1,9 +1,10 @@ /* * (C) Copyright 2014 Leo C. * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ +#include "debug.h" #include "common.h" #include #include @@ -13,7 +14,6 @@ #include "command.h" #include "cli_readline.h" #include "print-utils.h" -#include "debug.h" /* * Debugging @@ -170,7 +170,7 @@ mod_mem_avr(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg data = *addr; printf_P(PSTR("%04x: %02x"), addr, data); - nbytes = cli_readline(PSTR(" ? ")); + nbytes = cli_readline(PSTR(" ? "), 0); if (nbytes == 0 || (nbytes == 1 && console_buffer[0] == '-')) { /* pressed as only input, don't modify current * location and move to next. "-" pressed will go back. @@ -189,7 +189,7 @@ mod_mem_avr(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg addr++; } } - } while (nbytes); + } while (nbytes > 0); mm_last_addr = addr; return CMD_RET_SUCCESS;