Skip to content

Commit

Permalink
Added a crash condition check if final item id is blank or not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
neckkola committed Oct 7, 2024
1 parent 3653ea6 commit f569ba3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zone/evolving.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ void Client::DoEvolveItemDisplayFinalResult(const EQApplicationPacket* app)
const auto in = reinterpret_cast<EvolveItemToggle_Struct*>(app->pBuffer);

const uint32 item_id = static_cast<uint32>(in->unique_id & 0xFFFFFFFF);
if (item_id == 0) {
LogEvolveItem("Error - Item ID of final evolve item is blank.");
return;
}

std::unique_ptr<EQ::ItemInstance> const inst(database.CreateItem(item_id));

LogEvolveItemDetail("Character ID <green>[{}] requested to view final evolve item id <yellow>[{}] for evolve item id <yellow>[{}]",
Expand Down

0 comments on commit f569ba3

Please sign in to comment.