From 179fab6819d67b04d2d8caa13bc9fe936aff3a3c Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 2 Dec 2015 20:06:38 +0000 Subject: MirLua: updated lua to 5.3.2 git-svn-id: http://svn.miranda-ng.org/main/trunk@15807 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src/mlua_utils.cpp') diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index 3bd1298263..7d8d158555 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -4,7 +4,7 @@ int luaM_print(lua_State *L) { CMStringA data; int nargs = lua_gettop(L); - for (int i = 1; i <= nargs; ++i) + for (int i = 1; i <= nargs; i++) { switch (lua_type(L, i)) { @@ -26,7 +26,8 @@ int luaM_print(lua_State *L) break; } } - data.Delete(data.GetLength() - 3, 3); + if (data.GetLength() >= 3) + data.Delete(data.GetLength() - 3, 3); CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)data.GetBuffer()); -- cgit v1.2.3