Skip to content

Commit

Permalink
[orbis-kernel] Fix sys_namedobj_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Jul 15, 2023
1 parent 91ccd75 commit 9ccf27a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orbis-kernel/src/sys/sys_sce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ orbis::SysResult orbis::sys_namedobj_create(Thread *thread,
ptr<const char[32]> name,
ptr<void> object, uint16_t type) {
ORBIS_LOG_NOTICE(__FUNCTION__, name, object, type);
if (!name)
return ErrorCode::INVAL;
char _name[32];
if (auto result = ureadString(_name, sizeof(_name), (const char *)name);
result != ErrorCode{}) {
Expand All @@ -335,7 +337,7 @@ orbis::SysResult orbis::sys_namedobj_delete(Thread *thread, uint16_t id,
uint16_t type) {
ORBIS_LOG_NOTICE(__FUNCTION__, id, type);
if (id == 0)
return ErrorCode::INVAL;
return ErrorCode::SRCH;
if (type < 0x101 || type > 0x104) {
if (type != 0x107)
ORBIS_LOG_ERROR(__FUNCTION__, id, type);
Expand All @@ -353,6 +355,7 @@ orbis::SysResult orbis::sys_namedobj_delete(Thread *thread, uint16_t id,
ORBIS_LOG_ERROR("Named object: pointer not found", type, object);
}

thread->tproc->namedObjIds.destroy(id);
return {};
}
orbis::SysResult orbis::sys_set_vm_container(Thread *thread /* TODO */) {
Expand Down

0 comments on commit 9ccf27a

Please sign in to comment.