diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-24 07:46:19 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-24 07:46:19 +0000 |
commit | 79e72318c2ef4b2973d6c3af023800768917650f (patch) | |
tree | 853bb1ddef138c6191a0a21cadaf99fea5256a38 | |
parent | c66efb702eefd0610ffd08fbc09ab4e542407de1 (diff) | |
download | rockbox-79e72318c2ef4b2973d6c3af023800768917650f.tar.gz rockbox-79e72318c2ef4b2973d6c3af023800768917650f.zip |
1 byte reads past a sector boundary failed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1138 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/common/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index 98bfdce42e..1005780cff 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -150,7 +150,7 @@ int read(int fd, void* buf, int count) | |||
150 | headbytes = count; | 150 | headbytes = count; |
151 | openfiles[fd].cacheoffset += count; | 151 | openfiles[fd].cacheoffset += count; |
152 | if ( openfiles[fd].cacheoffset >= SECTOR_SIZE ) | 152 | if ( openfiles[fd].cacheoffset >= SECTOR_SIZE ) |
153 | openfiles[fd].cacheoffset = 0; | 153 | openfiles[fd].cacheoffset = -1; |
154 | } | 154 | } |
155 | else { | 155 | else { |
156 | headbytes = SECTOR_SIZE - openfiles[fd].cacheoffset; | 156 | headbytes = SECTOR_SIZE - openfiles[fd].cacheoffset; |