aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorLars Persson2008-07-19 07:08:37 +0000
committerLars Persson2008-07-19 07:08:37 +0000
commit6cff2e82399bd9fb7ff87378f84d9f83aedfed5a (patch)
treea119ad7a31771e28b3fafa5d73187742d01b293e /backends
parent4657a52b077740c0c1da6208019ba886d0da2242 (diff)
downloadscummvm-rg350-6cff2e82399bd9fb7ff87378f84d9f83aedfed5a.tar.gz
scummvm-rg350-6cff2e82399bd9fb7ff87378f84d9f83aedfed5a.tar.bz2
scummvm-rg350-6cff2e82399bd9fb7ff87378f84d9f83aedfed5a.zip
eof was not working properly with caching
svn-id: r33108
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index d362d27d74..660b0c69ed 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -597,13 +597,18 @@ size_t symbian_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handl
bool symbian_feof(FILE* handle) {
TInt pos = 0;
+ TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
- if (((TSymbianFileEntry*)(handle))->iFileHandle.Seek(ESeekCurrent, pos) == KErrNone) {
+ if (entry->iFileHandle.Seek(ESeekCurrent, pos) == KErrNone) {
TInt size = 0;
- if (((TSymbianFileEntry*)(handle))->iFileHandle.Size(size) == KErrNone) {
- if (pos == size)
+ if (entry->iFileHandle.Size(size) == KErrNone) {
+ if(entry->iInputPos == KErrNotFound && pos == size)
+ return true;
+
+ if(entry->iInputPos != KErrNotFound && pos == size && entry->iInputPos == entry->iInputBufferLen)
return true;
+
return false;
}
}