summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/network/network_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 2c3cc5721..f58d69f76 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -517,10 +517,10 @@ public:
return state;
}
- if (this->HandleEditBoxKey(NGWW_PLAYER, keycode, key, state) == 1) return state; // enter pressed
+ if (this->HandleEditBoxKey(NGWW_PLAYER, key, keycode, state) == 1) return state; // enter pressed
/* The name is only allowed when it starts with a letter! */
- if (StrEmpty(this->edit_str_buf) && this->edit_str_buf[0] != ' ') {
+ if (!StrEmpty(this->edit_str_buf) && this->edit_str_buf[0] != ' ') {
ttd_strlcpy(_network_player_name, this->edit_str_buf, lengthof(_network_player_name));
} else {
ttd_strlcpy(_network_player_name, "Player", lengthof(_network_player_name));