From d8ff318a1aa8528cc76a942a7e31f839b677dd5a Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 11 May 2022 22:03:39 +0100 Subject: [PATCH] Prevent infinite VFS read loop on EOF --- app/src/main/cpp/skyline/vfs/os_backing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/cpp/skyline/vfs/os_backing.cpp b/app/src/main/cpp/skyline/vfs/os_backing.cpp index b1b3884f..70f71a42 100644 --- a/app/src/main/cpp/skyline/vfs/os_backing.cpp +++ b/app/src/main/cpp/skyline/vfs/os_backing.cpp @@ -38,6 +38,8 @@ namespace skyline::vfs { } throw exception("Failed to read from fd: {}", strerror(errno)); + } else if (ret == 0) { + return bytesRead; } else { bytesRead += static_cast(ret); }