Merge pull request #1245 from piepie62/IFile-Fix

IFile: Fix reading past the end of file
This commit is contained in:
TuxSH 2019-04-23 11:29:54 +02:00 committed by GitHub
commit a5803d1b62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ Result IFile_Read(IFile *file, u64 *total, void *buffer, u32 len)
while (1)
{
res = FSFILE_Read(file->handle, &read, file->pos, buf, left);
if (R_FAILED(res))
if (R_FAILED(res) || read == 0)
{
break;
}