mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
DiscIO: Clear error status when reading file
This commit is contained in:
parent
d02eb3ca59
commit
467b3e6baf
3 changed files with 17 additions and 3 deletions
|
@ -130,7 +130,11 @@ bool WbfsFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
|||
File::IOFile& data_file = SeekToCluster(offset, &read_size);
|
||||
read_size = (read_size > nbytes) ? nbytes : read_size;
|
||||
|
||||
data_file.ReadBytes(out_ptr, read_size);
|
||||
if (!data_file.ReadBytes(out_ptr, read_size))
|
||||
{
|
||||
data_file.Clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
out_ptr += read_size;
|
||||
nbytes -= read_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue