mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 20:21:04 +00:00
console: handle empty input to esp_console_run correctly
Fixes https://github.com/espressif/esp-idf/issues/1067 Ref. TW15752
This commit is contained in:
@@ -185,7 +185,9 @@ esp_err_t esp_console_run(const char* cmdline, int* cmd_ret)
|
||||
|
||||
size_t argc = esp_console_split_argv(s_tmp_line_buf, argv,
|
||||
s_config.max_cmdline_args);
|
||||
|
||||
if (argc == 0) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
const cmd_item_t* cmd = find_command_by_name(argv[0]);
|
||||
if (cmd == NULL) {
|
||||
return ESP_ERR_NOT_FOUND;
|
||||
|
Reference in New Issue
Block a user