From e0c3971a766b3ace475f84a9c5a693e453a0711f Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 1 Feb 2016 07:29:58 +0100 Subject: [PATCH] LuaWrapper turned out not to have been 0-byte clean when pushing std::strings from C++! --- ext/luawrapper/include/LuaContext.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/luawrapper/include/LuaContext.hpp b/ext/luawrapper/include/LuaContext.hpp index f247eef7a8..8efccd41b7 100644 --- a/ext/luawrapper/include/LuaContext.hpp +++ b/ext/luawrapper/include/LuaContext.hpp @@ -1849,7 +1849,7 @@ struct LuaContext::Pusher { static const int maxSize = 1; static PushedObject push(lua_State* state, const std::string& value) noexcept { - lua_pushstring(state, value.c_str()); + lua_pushlstring(state, value.c_str(), value.length()); return PushedObject{state, 1}; } }; -- 2.47.2