diff --git a/components/finsh/finsh_token.c b/components/finsh/finsh_token.c index 3ca21e60db..91110bec26 100644 --- a/components/finsh/finsh_token.c +++ b/components/finsh/finsh_token.c @@ -521,8 +521,11 @@ static void token_proc_number(struct finsh_token* self) } else { - /* Not a valid number */ token_prev_char(self); + + /* made as 0 value */ + self->value.int_value = 0; + self->current_token = finsh_token_type_value_int; return; }