Don't use feof to check for end-of-file in DroppedFile.

Fixes #1551

Apparently `feof` is only set when `fread(..., size, count, ...) < size * count` happends,
however we actually have code that automatically adjust amount of bytes to read
(and at "eof" it really happends to be 0) so fread is never able to set the EOF flag.
This commit is contained in:
Miku AuahDark
2020-12-31 10:32:05 +08:00
parent c04b8d19a0
commit 7524677d4c
+1 -1
View File
@@ -165,7 +165,7 @@ bool DroppedFile::flush()
bool DroppedFile::isEOF()
{
return file == nullptr || feof(file) != 0;
return file == nullptr || tell() >= getSize();
}
int64 DroppedFile::tell()