mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Shortcut a read outside the file.
This happened to me.
This commit is contained in:
parent
99b422aa0a
commit
53e6d49568
@ -312,6 +312,10 @@ void HTTPFileLoader::Seek(s64 absolutePos) {
|
||||
|
||||
size_t HTTPFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data) {
|
||||
s64 absoluteEnd = std::min(absolutePos + (s64)bytes, filesize_);
|
||||
if (absolutePos >= filesize_ || bytes == 0) {
|
||||
// Read outside of the file or no read at all, just fail immediately.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: Keepalive, etc.
|
||||
client_.Connect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user