From 6cc39ef023f6d5ba4a576161f52934cd768e1e9b Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 14 Aug 2021 00:15:48 +0200 Subject: [PATCH] Fix text.utf8 edge case --- text.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text.lua b/text.lua index 8f5e9a8..312446f 100644 --- a/text.lua +++ b/text.lua @@ -131,7 +131,7 @@ magic_charset = "[" .. table.concat(magic_charset) .. "]" function escape_magic_chars(text) return text:gsub("(" .. magic_charset .. ")", "%%%1") end function utf8(number) - if number < 0x007F then + if number <= 0x007F then -- Single byte return string.char(number) end