Skip to content

Commit

Permalink
Fixed FUNC vulnerability if the item was deleted with that function c…
Browse files Browse the repository at this point in the history
…all.
  • Loading branch information
cbnolok committed Sep 25, 2023
1 parent 7d68537 commit fe27685
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,11 @@ bool CChar::ReadScriptReduced(CResourceLock &s, bool fVendor)
pScriptArgs = std::make_unique<CScriptTriggerArgs>(ptcArgs);
}
pItem->r_Call(ptcFunctionName, this, pScriptArgs.get());
if (pItem->IsDeleted())
{
fItemCreation = false;
g_Log.EventDebug("FUNC deleted the item.\n");
}
}
else if ( fVendor )
{
Expand Down

0 comments on commit fe27685

Please sign in to comment.