提交 14a840b9 编写于 作者: wuyangyong's avatar wuyangyong

fix cat print buffer no \0

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1176 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 3f5623a8
......@@ -516,7 +516,7 @@ void cat(const char* filename)
do
{
rt_memset(buffer, 0, sizeof(buffer));
length = dfs_file_read(&fd, buffer, 81);
length = dfs_file_read(&fd, buffer, sizeof(buffer)-1 );
if (length > 0)
{
rt_kprintf("%s", buffer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册