From 441740e021f48a3c4f7595711777b7655fdd5778 Mon Sep 17 00:00:00 2001 From: red-001 Date: Wed, 10 May 2017 22:25:45 +0100 Subject: Menu: Fix starting a server if the server address is an empty string. (#5742) Minetest uses an empty string internal to signal that a server should be started. --- builtin/mainmenu/tab_multiplayer.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/mainmenu/tab_multiplayer.lua b/builtin/mainmenu/tab_multiplayer.lua index a9b2b35fe..f40b707ac 100644 --- a/builtin/mainmenu/tab_multiplayer.lua +++ b/builtin/mainmenu/tab_multiplayer.lua @@ -299,7 +299,8 @@ local function main_button_handler(tabview, fields, name, tabdata) return true end - if (fields.btn_mp_connect or fields.key_enter) and fields.te_address and fields.te_port then + if (fields.btn_mp_connect or fields.key_enter) + and fields.te_address ~= "" and fields.te_port then gamedata.playername = fields.te_name gamedata.password = fields.te_pwd gamedata.address = fields.te_address -- cgit v1.2.3