[rpcsx-os] Disallow sys_close on fd 0

Hack, will be removed
This commit is contained in:
DH 2023-07-14 04:34:40 +03:00
parent 665d74740a
commit 81c7920a73

View file

@ -129,6 +129,9 @@ orbis::SysResult open(orbis::Thread *thread, orbis::ptr<const char> path,
}
orbis::SysResult close(orbis::Thread *thread, orbis::sint fd) {
if (fd == 0) {
return {};
}
if (!thread->tproc->fileDescriptors.close(fd)) {
return ErrorCode::BADF;
}