src/network/network_chat_gui.cpp
changeset 10276 b60b7e17db62
parent 10207 c291a21b304e
child 10295 52982b3d0d84
--- a/src/network/network_chat_gui.cpp	Wed Oct 22 17:26:40 2008 +0000
+++ b/src/network/network_chat_gui.cpp	Wed Oct 22 19:12:10 2008 +0000
@@ -374,11 +374,11 @@
 					/* If we are completing at the begin of the line, skip the ': ' we added */
 					if (tb_buf == pre_buf) {
 						offset = 0;
-						length = tb->length - 2;
+						length = (tb->size - 1) - 2;
 					} else {
 						/* Else, find the place we are completing at */
 						offset = strlen(pre_buf) + 1;
-						length = tb->length - offset;
+						length = (tb->size - 1) - offset;
 					}
 
 					/* Compare if we have a match */