mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-08 06:35:33 +00:00
Fix small bug where we enter an infinite loop after we finish reading a file.
This commit is contained in:
parent
7049dc3077
commit
40a0947649
|
@ -204,7 +204,7 @@ unsigned char *ImageFile::ReadFileData(const CHAR *filename) {
|
|||
uint64 totalBytesLeft = fileSize;
|
||||
uint32 bytesToRead = uint32(std::min(totalBytesLeft, uint64(1 << 31)));
|
||||
int32 bytesRead;
|
||||
while((bytesRead = fstr.Read(rawData, uint32(fileSize))) >= 0) {
|
||||
while((bytesRead = fstr.Read(rawData, uint32(fileSize))) > 0) {
|
||||
totalBytesRead += bytesRead;
|
||||
totalBytesLeft -= bytesRead;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue