summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorwuyangyong <[email protected]>2010-12-04 07:27:11 +0000
committerwuyangyong <[email protected]>2010-12-04 07:27:11 +0000
commit14a840b911701783687321fbc74ab43e1dc844b2 (patch)
treee8c621d0e8fbae510baaf7d3adedb78dec219d17 /components
parent3f5623a8ee14db94c7710e6b9eef22c5012f8eb3 (diff)
fix cat print buffer no \0
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1176 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
-rw-r--r--components/dfs/src/dfs_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c
index 15b42a2af9..4deba547be 100644
--- a/components/dfs/src/dfs_file.c
+++ b/components/dfs/src/dfs_file.c
@@ -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);