Skip to content

Commit

Permalink
Clear item list for every storage at unit freeing
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonch35 committed Jan 2, 2025
1 parent 8eaf684 commit 761ea97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3004,6 +3004,9 @@ static int unit_free(struct block_list *bl, enum clr_type clrtype)
VECTOR_CLEAR(sd->hatEffectId);
VECTOR_CLEAR(sd->title_ids); // Title [Dastgir/Hercules]
VECTOR_CLEAR(sd->agency_requests);

for (int i = 0; i < VECTOR_LENGTH(sd->storage.list); i++)
VECTOR_CLEAR(VECTOR_INDEX(sd->storage.list, i).item);
VECTOR_CLEAR(sd->storage.list);

if( sd->quest_log != NULL ) {
Expand Down

0 comments on commit 761ea97

Please sign in to comment.