From d2b7f6fd64e3e6498ce65dc07b235090db5860e6 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sat, 19 Sep 2015 16:50:55 +0200 Subject: [PATCH] src/gui/luainstance.cpp: Fix copy/paste error in commit aa7f5e6 - Set Lua api version to 1.5 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cf4beae8921920a5905e429e6fefd7f11a75349a Author: Michael Liebmann Date: 2015-09-19 (Sat, 19 Sep 2015) --- src/gui/luainstance.cpp | 4 ++-- src/gui/luainstance.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 7a94dd559..e88ce2bcb 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1185,7 +1185,7 @@ int CLuaMenuStringinput::exec(CMenuTarget* /*parent*/, const std::string & /*act lua_remove(L, -2); lua_pushstring(L, luaId.c_str()); lua_pushstring(L, value->c_str()); - int status = lua_pcall(L, 1 /* one arg */, 1 /* one result */, 0); + int status = lua_pcall(L, 2 /* two arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuStringinput::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); luaL_error(L, " => %s", lua_tostring(L, -1)); @@ -1218,7 +1218,7 @@ int CLuaMenuKeyboardinput::exec(CMenuTarget* /*parent*/, const std::string & /*a lua_remove(L, -2); lua_pushstring(L, luaId.c_str()); lua_pushstring(L, value->c_str()); - int status = lua_pcall(L, 1 /* one arg */, 1 /* one result */, 0); + int status = lua_pcall(L, 2 /* two arg */, 1 /* one result */, 0); if (status) { fprintf(stderr, "[CLuaMenuKeyboardinput::%s:%d] error in script: %s\n", __func__, __LINE__, lua_tostring(L, -1)); luaL_error(L, " => %s", lua_tostring(L, -1)); diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 848f59588..2420c0368 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 4 +#define LUA_API_VERSION_MINOR 5 /* this is stored as userdata in the lua_State */ struct CLuaData