summaryrefslogtreecommitdiff
path: root/src/network/network_chat_gui.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-02-09 15:57:03 +0000
committerterkhen <terkhen@openttd.org>2011-02-09 15:57:03 +0000
commit0828653cf9c63a5b3428eeee0ae2724979522f74 (patch)
tree2b144624df0d57370d03c26b1ffcb7b39434d0b6 /src/network/network_chat_gui.cpp
parente76465bab90ba1812db9af9a19ef58e1836e1d7f (diff)
downloadopenttd-0828653cf9c63a5b3428eeee0ae2724979522f74.tar.xz
(svn r22038) -Fix (r21406): Tab completion in chat did not cycle through all possible options.
Diffstat (limited to 'src/network/network_chat_gui.cpp')
-rw-r--r--src/network/network_chat_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index a48845594..539a49270 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -398,11 +398,11 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
/* If we are completing at the begin of the line, skip the ': ' we added */
if (tb_buf == pre_buf) {
offset = 0;
- length = (tb->max_bytes - 1) - 2;
+ length = (tb->bytes - 1) - 2;
} else {
/* Else, find the place we are completing at */
offset = strlen(pre_buf) + 1;
- length = (tb->max_bytes - 1) - offset;
+ length = (tb->bytes - 1) - offset;
}
/* Compare if we have a match */