# HG changeset patch # User Sebastien Jodogne # Date 1481625815 -3600 # Node ID 0fb6e04611051a1e9b248d9f363142e8269f4279 # Parent 262fcab240246d117e108e349f1e5eca77bf57e4 fix handling of Booleans in Lua diff -r 262fcab24024 -r 0fb6e0461105 Core/Lua/LuaContext.cpp --- a/Core/Lua/LuaContext.cpp Tue Dec 13 11:06:41 2016 +0100 +++ b/Core/Lua/LuaContext.cpp Tue Dec 13 11:43:35 2016 +0100 @@ -497,6 +497,10 @@ // Lua can convert most types to strings by default. result = std::string(lua_tostring(lua_, top)); } + else if (lua_isboolean(lua_, top)) + { + result = lua_toboolean(lua_, top) ? true : false; + } else { LOG(WARNING) << "Unsupported Lua type when returning Json";