Minor: str:sub -> string.sub for consistency with the rest of the code

This commit is contained in:
Y. Wang 2024-03-18 02:05:14 +01:00
parent 458c8cff9d
commit 7be1254307
No known key found for this signature in database
GPG Key ID: 54A05DDF18D7A0EB
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ do
local function replace_single(pfx, c)
local pl = #pfx
if pl % 2 == 0 then
return pfx:sub(1, pl/2) .. c
return string.sub(pfx, 1, pl/2) .. c
end
return string.sub(pfx, 1, math.floor(pl/2)) .. (schartbl[c] or c)
end