mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Fix placing sign with empty text getting "nil"
This commit is contained in:
parent
f2028670cf
commit
66887d044e
1 changed files with 1 additions and 1 deletions
|
@ -320,7 +320,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
if not mcl_util.check_position_protection(pos, player) and (signs_editable or minetest.get_meta(pos):get_string("text") == "") then
|
||||
set_signmeta(pos,{
|
||||
text = tostring(fields.text):sub(1, 256), --limit saved text to 256 characters (4 lines x 15 chars = 60 so this should be more than is ever needed).
|
||||
text = tostring(fields.text or ""):sub(1, 256), --limit saved text to 256 characters (4 lines x 15 chars = 60 so this should be more than is ever needed).
|
||||
})
|
||||
mcl_signs.update_sign(pos)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue