From 2412dfb1c8063c97b5675894cac26447ae70c0d9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 4 Mar 2016 22:27:04 +0000 Subject: [PATCH] util.json: Fix encoding of json.null (bug introduced in bf1f09a5bcf7) --- util/json.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/json.lua b/util/json.lua index becd295d..2c598446 100644 --- a/util/json.lua +++ b/util/json.lua @@ -145,7 +145,9 @@ end function simplesave(o, buffer) local t = type(o); - if t == "number" then + if o == null then + t_insert(buffer, "null"); + elseif t == "number" then t_insert(buffer, tostring(o)); elseif t == "string" then stringsave(o, buffer); -- 2.30.2