From 655f7f61a9a4fc933d7b74e8fa48df045a6cfa1d Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Sat, 12 Sep 2020 13:23:59 -0400 Subject: [PATCH] Fix luajit / lua 5.1 incompatibility in common.utf8_chars In lua 5.1, \x is not supported in string literals, and gmatch stops parsing after a literal \0, so %z must be used instead. --- data/core/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/common.lua b/data/core/common.lua index 1fc91b8..5bf4f3d 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -8,7 +8,7 @@ end function common.utf8_chars(text) - return text:gmatch("[\0-\x7f\xc2-\xf4][\x80-\xbf]*") + return text:gmatch("[%z\001-\127\194-\244][\128-\191]*") end