Skip to content

Commit

Permalink
Fix nullpo-check return values an initial value of variable ret i…
Browse files Browse the repository at this point in the history
…n `mobskill_event()`
  • Loading branch information
Kenpachi2k13 committed Oct 31, 2020
1 parent 99a0a63 commit 521ca00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/map/mob.c
Original file line number Diff line number Diff line change
Expand Up @@ -3735,10 +3735,10 @@ static int mob_skill_use(struct mob_data *md, int64 tick, int event)
*------------------------------------------*/
static int mobskill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag)
{
int target_id, res = 0;
int target_id, res = 1;

nullpo_ret(md);
nullpo_ret(src);
nullpo_retr(1, md);
nullpo_retr(1, src);
if(md->bl.prev == NULL || md->status.hp <= 0)
return 1;

Expand Down

0 comments on commit 521ca00

Please sign in to comment.