1
0
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:
Darkvater
2006-05-02 13:07:23 +00:00
parent aba21dd563
commit f0e3fa29e5
5 changed files with 15 additions and 15 deletions

View File

@@ -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);