summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/jsonrpc.lua3
-rw-r--r--script/service.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/script-beta/jsonrpc.lua b/script-beta/jsonrpc.lua
index 4dda6fb0..5957588f 100644
--- a/script-beta/jsonrpc.lua
+++ b/script-beta/jsonrpc.lua
@@ -49,7 +49,10 @@ function m.decode(reader, errHandle)
if not content then
return nil
end
+ local null = json.null
+ json.null = nil
local suc, res = pcall(json.decode, content)
+ json.null = null
if not suc then
errHandle('Proto parse error: ' .. res)
return nil
diff --git a/script/service.lua b/script/service.lua
index 09d4afdb..44d75b58 100644
--- a/script/service.lua
+++ b/script/service.lua
@@ -783,7 +783,10 @@ function mt:_loadProto()
if not ok then
break
end
+ local null = json.null
+ json.null = nil
local suc, proto = xpcall(json.decode, log.error, protoStream)
+ json.null = null
if not suc then
break
end