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:
parent
3f5623a8ee
commit
14a840b911
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue