summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-05-26 10:13:48 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-05-26 10:13:48 +0200
commitaf9266d21c787074f9c7b7a715577a79952edccb (patch)
tree1f51ff08165d8e8326393504aa3cdf49180ef7fd /tools.c
parent09386e621d50d9f4f3e894afc888aa980b5fafac (diff)
downloadvdr-af9266d21c787074f9c7b7a715577a79952edccb.tar.gz
vdr-af9266d21c787074f9c7b7a715577a79952edccb.tar.bz2
Fixed calculating the cache size in cUnbufferedFile::Read()
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools.c b/tools.c
index 53523fa0..475afdb8 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.117 2006/04/21 15:12:47 kls Exp $
+ * $Id: tools.c 1.118 2006/05/26 10:10:31 kls Exp $
*/
#include "tools.h"
@@ -1179,7 +1179,7 @@ ssize_t cUnbufferedFile::Read(void *Data, size_t Size)
}
else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) {
// current position has moved back enough, shrink head window.
- FadviseDrop(curpos + READCHUNK, cachedend - curpos + READCHUNK);
+ FadviseDrop(curpos + READCHUNK, cachedend - (curpos + READCHUNK));
cachedend = curpos + READCHUNK;
}
}