From 0a32217a1a246c5f05c7b492c2d34276ad95969f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 15 Jun 2016 08:22:23 +0000 Subject: MirLua: fix previous commit git-svn-id: http://svn.miranda-ng.org/main/trunk@16976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_database.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua') diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index f37182e210..b9318c1047 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -254,7 +254,6 @@ void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei) lua_pop(L, 1); lua_getfield(L, -1, "Blob"); - switch (lua_type(L, -1)) { case LUA_TTABLE: @@ -658,12 +657,16 @@ int MT::Index(lua_State *L, DBEVENTINFO *dbei) if (mir_strcmpi(key, "Blob") == 0) { lua_createtable(L, dbei->cbBlob, 0); - for (int i = 0; i < dbei->cbBlob; i++) + for (DWORD i = 0; i < dbei->cbBlob; i++) { lua_pushinteger(L, dbei->pBlob[i]); lua_rawseti(L, -2, i + 1); } } + else + lua_pushnil(L); + + return 1; } void MT::Free(lua_State*, DBEVENTINFO **dbei) -- cgit v1.2.3