(svn r20220) -Fix [FS#3974]: strip non-printable characters before showing it in an edit box, so when renaming a vehicle type you won't get the "SETX stuff" that some NewGRFs use
This commit is contained in:
@@ -1282,7 +1282,7 @@ struct QueryStringWindow : public QueryStringBaseWindow
|
||||
QueryStringBaseWindow(maxsize)
|
||||
{
|
||||
GetString(this->edit_str_buf, str, &this->edit_str_buf[maxsize - 1]);
|
||||
this->edit_str_buf[maxsize - 1] = '\0';
|
||||
str_validate(this->edit_str_buf, &this->edit_str_buf[maxsize - 1], false, true);
|
||||
|
||||
if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf);
|
||||
|
||||
|
Reference in New Issue
Block a user