Fix text.utf8 edge case

master
Lars Mueller 2021-08-14 00:15:48 +02:00
parent 9fee80061e
commit 6cc39ef023
1 changed files with 1 additions and 1 deletions

View File

@ -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