mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-24 01:54:58 +00:00
File seek beyond file size should not fail
This caused Ridge Racer 2 to freeze after a few seconds
This commit is contained in:
parent
0c4b7905ac
commit
aa5996d028
@ -463,7 +463,7 @@ s64 sceIoLseek(int id, s64 offset, int whence) {
|
||||
seek = FILEMOVE_END;
|
||||
break;
|
||||
}
|
||||
if(newPos < 0 || newPos > f->info.size)
|
||||
if(newPos < 0)
|
||||
return -1;
|
||||
|
||||
f->asyncResult = (u32) pspFileSystem.SeekFile(f->handle, (s32) offset, seek);
|
||||
@ -497,7 +497,7 @@ u32 sceIoLseek32(int id, int offset, int whence) {
|
||||
seek = FILEMOVE_END;
|
||||
break;
|
||||
}
|
||||
if(newPos < 0 || newPos > f->info.size)
|
||||
if(newPos < 0)
|
||||
return -1;
|
||||
|
||||
f->asyncResult = (u32) pspFileSystem.SeekFile(f->handle, (s32) offset, seek);
|
||||
|
Loading…
x
Reference in New Issue
Block a user