summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-07-10 08:16:44 +0200
committerMattes D <github@xoft.cz>2016-07-10 08:16:44 +0200
commit5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5 (patch)
tree2dccada9068fa3fae2e9d19b1cdaa56f0047606b /src
parentremoved cast from BlockTrapdoor.h (#3256) (diff)
downloadcuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar.gz
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar.bz2
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar.lz
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar.xz
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.tar.zst
cuberite-5095a9f48b26cdadefc7d3e9de2b2a53bd0629e5.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaJson.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp
index 4fa16273c..39a720319 100644
--- a/src/Bindings/LuaJson.cpp
+++ b/src/Bindings/LuaJson.cpp
@@ -160,6 +160,16 @@ static Json::Value JsonSerializeValue(cLuaState & a_LuaState)
{
switch (lua_type(a_LuaState, -1))
{
+ case LUA_TBOOLEAN:
+ {
+ bool v;
+ a_LuaState.GetStackValue(-1, v);
+ return Json::Value(v);
+ }
+ case LUA_TNIL:
+ {
+ return Json::Value(Json::nullValue);
+ }
case LUA_TNUMBER:
{
lua_Number v;