diff --git a/src/lua/core/fbgpu.lua b/src/lua/core/fbgpu.lua index fcffddb..88c2ad9 100644 --- a/src/lua/core/fbgpu.lua +++ b/src/lua/core/fbgpu.lua @@ -147,7 +147,7 @@ function fbgpu.start() checkArg(3, w, "number") checkArg(4, h, "number") checkArg(5, ch, "string") - ch = ch:sub(1, 1) + ch = usub(ch, 1, 1) fb.fill(x-1, y-1, x+w-2, y+h-2, background, foreground, utf8.codepoint(ch)) return true end diff --git a/src/lua/core/winapigpu.lua b/src/lua/core/winapigpu.lua index 506fec5..cc3b735 100644 --- a/src/lua/core/winapigpu.lua +++ b/src/lua/core/winapigpu.lua @@ -22,7 +22,10 @@ end local background = 0 local foreground = 0 +local usub + function wingpu.start() + usub = modules.sandbox.unicode.sub local gpu = {} function gpu.bind() return false, "This is static bound gpu" end @@ -135,7 +138,7 @@ function wingpu.start() checkArg(3, w, "number") checkArg(4, h, "number") checkArg(5, ch, "string") - ch = ch:sub(1, 1) + ch = usub(ch, 1, 1) win.fill(x-1, y-1, x+w-2, y+h-2, background, foreground, utf8.codepoint(ch)) return true end