From cde9139bc59d8a2a8395a8dd39dd51ff6eb2c050 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Mon, 5 May 2014 13:51:26 +0800 Subject: [PATCH] [Finsh] Fix '0' token issue. --- components/finsh/finsh_token.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }