mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Handle error when configuration file cmd too long
This commit is contained in:
1 parent
4440bcc43a
commit
c3530aaafc
1 file changed
+7
@@ -1190,6 +1190,13 @@ void execute_config(void) __banked
|
||||
if (!cfg_idx)
|
||||
break;
|
||||
}
|
||||
if (cmd_idx >= (CMD_BUF_SIZE - 1)) {
|
||||
cmd_buffer[cmd_idx] = '\0';
|
||||
print_string("ERROR: Command too long: ");
|
||||
print_string_x(cmd_buffer);
|
||||
write_char('\n');
|
||||
goto config_done;
|
||||
}
|
||||
|
||||
len_left -= FLASH_READ_BURST_SIZE;
|
||||
pos += FLASH_READ_BURST_SIZE;
|
||||
|
||||
Reference in new issue
Block a user