mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
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:
@@ -165,7 +165,7 @@ bool DroppedFile::flush()
|
||||
|
||||
bool DroppedFile::isEOF()
|
||||
{
|
||||
return file == nullptr || feof(file) != 0;
|
||||
return file == nullptr || tell() >= getSize();
|
||||
}
|
||||
|
||||
int64 DroppedFile::tell()
|
||||
|
||||
Reference in New Issue
Block a user