From e4d6b6be1f71fd5c8b02ef10d4c130fb5673b76e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 6 Jul 2015 11:59:33 +0000 Subject: MirLua: blob is not string git-svn-id: http://svn.miranda-ng.org/main/trunk@14497 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_database.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 3ab2fe48da..93dfc41238 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -98,8 +98,17 @@ static int lua_GetEvent(lua_State *L) lua_pushstring(L, "Type"); lua_pushinteger(L, dbei.eventType); lua_settable(L, -3); - lua_pushstring(L, "Text"); - lua_pushlstring(L, (const char*)dbei.pBlob, dbei.cbBlob); + lua_pushstring(L, "Length"); + lua_pushnumber(L, dbei.cbBlob); + lua_settable(L, -3); + lua_pushstring(L, "Blob"); + lua_newtable(L); + for (DWORD i = 0; i < dbei.cbBlob; i++) + { + lua_pushinteger(L, i + 1); + lua_pushinteger(L, dbei.pBlob[i]); + lua_settable(L, -3); + } lua_settable(L, -3); mir_free(dbei.pBlob); -- cgit v1.2.3