From bf2b62bc9cd5d698c853cd1dd6944a16f8df3816 Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Fri, 4 Nov 2022 21:00:58 -0700 Subject: [PATCH] Fix an issue when running map-server-generator in opt mode (#7378) --- src/map/npc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 09ee429340..26578b8988 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -3708,6 +3708,8 @@ struct npc_data *npc_create_npc(int16 m, int16 x, int16 y){ struct npc_data *nd = nullptr; CREATE(nd, struct npc_data, 1); + new (nd) npc_data(); + nd->bl.id = npc_get_new_npc_id(); nd->bl.prev = nd->bl.next = nullptr; nd->bl.m = m;