fix cat print buffer no \0

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1176 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2010-12-04 07:27:11 +00:00
parent 3f5623a8ee
commit 14a840b911
1 changed files with 1 additions and 1 deletions

View File

@ -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);