diff --git a/flash-tool/command_line.c b/flash-tool/command_line.c index 9d4f95b..4b8d15a 100644 --- a/flash-tool/command_line.c +++ b/flash-tool/command_line.c @@ -130,7 +130,7 @@ int handle_boot(void) int command_input(char *buf) { char *cptr; - cptr = fgets(buf, ARRAY_SIZE(buf), stdin); + cptr = fgets(buf, 256, stdin); if (cptr != NULL) return 0; diff --git a/flash-tool/main.c b/flash-tool/main.c index 7fd9e20..a7c59f6 100644 --- a/flash-tool/main.c +++ b/flash-tool/main.c @@ -88,7 +88,8 @@ int main(int argc, char **argv) while (1) { printf("\n inflash :> "); - if (!command_input(com_buf)) continue; + if (command_input(com_buf)) + continue; command_handle(com_buf); }