--- 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 */