1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 07:59:09 +00:00

Fix: do not use lengthof() for non C-style arrays

This commit is contained in:
Rubidium
2024-04-05 22:34:20 +02:00
committed by Loïc Guilloux
parent 774ea5676f
commit 6a9517a4e6
3 changed files with 3 additions and 3 deletions

View File

@@ -2256,7 +2256,7 @@ struct NetworkCompanyPasswordWindow : public Window {
QueryString password_editbox; ///< Password editbox.
Dimension warning_size; ///< How much space to use for the warning text
NetworkCompanyPasswordWindow(WindowDesc *desc, Window *parent) : Window(desc), password_editbox(lengthof(_settings_client.network.default_company_pass))
NetworkCompanyPasswordWindow(WindowDesc *desc, Window *parent) : Window(desc), password_editbox(NETWORK_PASSWORD_LENGTH)
{
this->InitNested(0);
this->UpdateWarningStringSize();