From 436e303e24e5046d6cc52ac3da51a0b51adbef36 Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Mon, 15 Jun 2020 18:35:21 +0300
Subject: simpler way of applying server ids to messages

---
 plugins/MirLua/src/Modules/m_database.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'plugins/MirLua/src')

diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp
index d4f5a051be..f00887a7da 100644
--- a/plugins/MirLua/src/Modules/m_database.cpp
+++ b/plugins/MirLua/src/Modules/m_database.cpp
@@ -327,10 +327,10 @@ static int db_AddEvent(lua_State *L)
 {
 	MCONTACT hContact = luaL_optinteger(L, 1, 0);
 
-	DBEVENTINFO dbei;
+	DBEVENTINFO dbei = {};
 	MakeDbEvent(L, dbei);
-	MEVENT hDbEvent = db_event_add(hContact, &dbei);
 
+	MEVENT hDbEvent = db_event_add(hContact, &dbei);
 	if (hDbEvent)
 		lua_pushnumber(L, hDbEvent);
 	else
-- 
cgit v1.2.3