fix gsub to sub

This commit is contained in:
Alexsandro Percy 2024-02-13 12:01:59 -03:00
parent 48943f878d
commit 7fa37d98e9
2 changed files with 2 additions and 1 deletions

View File

@ -648,7 +648,7 @@ if airutils._use_signs_api then
if entity then
if entity.owner == name or minetest.check_player_privs(name, {protection_bypass=true}) then
if param then
entity._ship_name = string.gsub(param, 1,20)
entity._ship_name = string.sub(param, 1,20)
else
entity._ship_name = ""
end

View File

@ -176,6 +176,7 @@ local function make_text_texture(text, default_color, line_width, line_height, c
end
function airutils.convert_text_to_texture(text, default_color, horizontal_aligment)
text = text or ""
default_color = default_color or 0
horizontal_aligment = horizontal_aligment or 3
local font_size