1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-09-07 09:45:22 +02:00

Fix minus character (-) being stripped from signs (#3210)

This commit is contained in:
DS
2025-09-06 01:29:02 +02:00
committed by GitHub
parent c526be36ff
commit aac492d9b0

View File

@@ -2620,7 +2620,7 @@ local function register_sign(material, desc, def)
minetest.chat_send_player(player_name, S("Text too long"))
return
end
text = text:gsub("[%z-\8\11-\31\127]", "") -- strip naughty control characters (keeps \t and \n)
text = text:gsub("[%z\1-\8\11-\31\127]", "") -- strip naughty control characters (keeps \t and \n)
default.log_player_action(sender, ("wrote %q to the sign at"):format(text), pos)
local meta = minetest.get_meta(pos)
meta:set_string("text", text)