From c20bc91ba364ef4841fd5a2803147b23269e2ee2 Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 16 Oct 2013 21:09:32 +0800 Subject: [PATCH] fix JSON parser on some rare utf8 representations This patch is provided by @hchaojie and should fix #252. --- frontend/JSON.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/JSON.lua b/frontend/JSON.lua index 4be1d95a9..d507d950e 100644 --- a/frontend/JSON.lua +++ b/frontend/JSON.lua @@ -326,6 +326,8 @@ local function grok_string(self, text, start, etc) elseif text:match('^\\t', i) then VALUE = VALUE .. "\t" i = i + 2 + elseif text:match('^\\\\', i) then + i = i + 1 else local hex = text:match('^\\u([0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i) if hex then