From 1c35482ecf17f2385e1f75a3bfa479a61ed0f65a Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Sun, 12 Mar 2023 12:38:47 -0700 Subject: [PATCH] Change copied bl type to BL_NUL for delayed clif_clearunit (#7640) Co-authored-by: Lemongrass3110 --- src/map/clif.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 99408aafd7..25faf0066e 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -1006,7 +1006,13 @@ static TIMER_FUNC(clif_clearunit_delayed_sub){ void clif_clearunit_delayed(struct block_list* bl, clr_type type, t_tick tick) { struct block_list *tbl = ers_alloc(delay_clearunit_ers, struct block_list); - memcpy (tbl, bl, sizeof (struct block_list)); + tbl->next = nullptr; + tbl->prev = nullptr; + tbl->id = bl->id; + tbl->m = bl->m; + tbl->x = bl->x; + tbl->y = bl->y; + tbl->type = BL_NUL; add_timer(tick, clif_clearunit_delayed_sub, (int)type, (intptr_t)tbl); }