mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Fix out-of-bounds crash when fiddling with NPCs
This commit is contained in:
@ -784,7 +784,9 @@ plSynchedObject* plNetClientMgr::GetLocalPlayer(bool forceLoad) const
|
|||||||
|
|
||||||
plSynchedObject* plNetClientMgr::GetNPC(uint32_t i) const
|
plSynchedObject* plNetClientMgr::GetNPC(uint32_t i) const
|
||||||
{
|
{
|
||||||
return fNPCKeys[i] ? plSynchedObject::ConvertNoRef(fNPCKeys[i]->ObjectIsLoaded()) : nil;
|
if (i >= fNPCKeys.size())
|
||||||
|
return nullptr;
|
||||||
|
return plSynchedObject::ConvertNoRef(fNPCKeys[i]->ObjectIsLoaded());
|
||||||
}
|
}
|
||||||
|
|
||||||
void plNetClientMgr::AddNPCKey(const plKey& npc)
|
void plNetClientMgr::AddNPCKey(const plKey& npc)
|
||||||
|
Reference in New Issue
Block a user