Skip to content

Commit

Permalink
Merge pull request #2924 from skyleo/unit-run-hit-crashfix
Browse files Browse the repository at this point in the history
Fix a guaranteed segment fault in unit->run_hit
  • Loading branch information
4144 authored Dec 28, 2020
2 parents 41dbd8c + 8a61b3e commit de411a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ static void unit_run_hit(struct block_list *bl, struct status_change *sc, struct
nullpo_retv(ud);
//Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
ud->state.running = 0;
int lv = sc->data[type]->val1;
status_change_end(bl, type, INVALID_TIMER);

int lv = sc->data[type]->val1;
if (type == SC_RUN) {
if (lv > 0)
skill->blown(bl, bl, skill->get_blewcount(TK_RUN, lv), unit->getdir(bl), 0);
Expand Down

0 comments on commit de411a9

Please sign in to comment.