Browse Source

fix romfs lseek issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1663 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 14 years ago
parent
commit
f6ce7bb0d9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/dfs/filesystems/romfs/dfs_romfs.c

+ 1 - 1
components/dfs/filesystems/romfs/dfs_romfs.c

@@ -119,7 +119,7 @@ int dfs_romfs_read(struct dfs_fd* file, void *buf, rt_size_t count)
 
 int dfs_romfs_lseek(struct dfs_fd* file, rt_off_t offset)
 {
-	if (offset < file->size)
+	if (offset <= file->size)
 	{
 		file->pos = offset;
 		return file->pos;