From 79e72318c2ef4b2973d6c3af023800768917650f Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 24 Jun 2002 07:46:19 +0000 Subject: 1 byte reads past a sector boundary failed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1138 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/common/file.c') 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) headbytes = count; openfiles[fd].cacheoffset += count; if ( openfiles[fd].cacheoffset >= SECTOR_SIZE ) - openfiles[fd].cacheoffset = 0; + openfiles[fd].cacheoffset = -1; } else { headbytes = SECTOR_SIZE - openfiles[fd].cacheoffset; -- cgit v1.2.3