From 8a61b3ec0ad7ac20929a81899a58939282dafb5f Mon Sep 17 00:00:00 2001 From: skyleo Date: Thu, 24 Dec 2020 16:30:48 +0100 Subject: [PATCH] Fix a guaranteed segment fault in unit->run_hit --- src/map/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/unit.c b/src/map/unit.c index c2e0c29927c..c018f42d85d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -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);