mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 21:19:10 +00:00
(svn r4668) - Backport from trunk (r4301):
Fix: the maxlength parameter of Textbuf is supposed to be the siz of the buffer (so length of string + '\0'), but in the code it was a mix of both.
This commit is contained in:
@@ -568,7 +568,7 @@ void ShowNetworkGameWindow(void)
|
||||
w->vscroll.cap = 12;
|
||||
|
||||
querystr->text.caret = true;
|
||||
querystr->text.maxlength = MAX_QUERYSTR_LEN - 1;
|
||||
querystr->text.maxlength = MAX_QUERYSTR_LEN;
|
||||
querystr->text.maxwidth = 120;
|
||||
querystr->text.buf = _edit_str_buf;
|
||||
UpdateTextBufferSize(&querystr->text);
|
||||
@@ -782,7 +782,7 @@ static void ShowNetworkStartServerWindow(void)
|
||||
w->vscroll.count = _fios_num+1;
|
||||
|
||||
WP(w, network_ql_d).q.text.caret = true;
|
||||
WP(w, network_ql_d).q.text.maxlength = MAX_QUERYSTR_LEN - 1;
|
||||
WP(w, network_ql_d).q.text.maxlength = MAX_QUERYSTR_LEN;
|
||||
WP(w, network_ql_d).q.text.maxwidth = 160;
|
||||
WP(w, network_ql_d).q.text.buf = _edit_str_buf;
|
||||
UpdateTextBufferSize(&WP(w, network_ql_d).q.text);
|
||||
|
Reference in New Issue
Block a user