diff options
author | smatz <smatz@openttd.org> | 2008-05-29 17:01:42 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-05-29 17:01:42 +0000 |
commit | a0c62f1752cdf402a4d97764aa2c42a0b9636bdc (patch) | |
tree | 63dc9fd20ddbbd5d2e75517498989231ae05ae5a /src | |
parent | bed7719967dfcc27a374e2cf0292bbb057db366e (diff) | |
download | openttd-a0c62f1752cdf402a4d97764aa2c42a0b9636bdc.tar.xz |
(svn r13330) -Fix: 'Player name' dialog was broken in two ways
Diffstat (limited to 'src')
-rw-r--r-- | src/network/network_gui.cpp | 4 |
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)); |