未验证 提交 8c230ba1 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2445 from misonyo/patch-1

[components/shell] shell will not work if ch is none zero as random value in stack
......@@ -139,7 +139,7 @@ static int finsh_getchar(void)
#ifdef RT_USING_POSIX
return getchar();
#else
int ch;
int ch = 0;
RT_ASSERT(shell != RT_NULL);
while (rt_device_read(shell->device, -1, &ch, 1) != 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册