aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-05-10 22:25:45 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-05-10 23:25:45 +0200
commit441740e021f48a3c4f7595711777b7655fdd5778 (patch)
tree574dd8f8a0df521e2c3e9831743a681490923c9d /builtin/mainmenu
parent071e114ffa945522a7a9acc3259427166992d5ee (diff)
downloadminetest-441740e021f48a3c4f7595711777b7655fdd5778.tar.gz
minetest-441740e021f48a3c4f7595711777b7655fdd5778.tar.bz2
minetest-441740e021f48a3c4f7595711777b7655fdd5778.zip
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.
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r--builtin/mainmenu/tab_multiplayer.lua3
1 files changed, 2 insertions, 1 deletions
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