From f216f27c985625634d5ef337fc266c0f7682aa08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 30 Oct 2020 16:30:08 +0800 Subject: =?UTF-8?q?fix=20#238=20json.decode=20=E6=97=B6=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=20null=20=E8=A7=A3=E6=9E=90=E4=B8=BA=20nil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/jsonrpc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script-beta/jsonrpc.lua') 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 -- cgit v1.2.3