mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-16 02:59:49 +01: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:
1 parent
0c4b7905ac
commit
aa5996d028
1 file changed
+2
-2
+2
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user