(svn r14514) -Codechange: use 'size' instead of 'length' for querystring and textbuf, explicitly say it includes the terminating zero
-Fix: one couldn't rename things with too long default/automatic name -Fix: buffer overflow in console when too long (1024 bytes) command was entered
This commit is contained in:
@@ -374,11 +374,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->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 */
|
||||
|
Reference in New Issue
Block a user