1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 12:14:11 +01: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 rubidium42
parent eaafc57de6
commit c544a2be0a
3 changed files with 3 additions and 3 deletions

View File

@@ -2251,7 +2251,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();