From 75ca1e3cda8c6cc38f85558e1cae7cbc351d0fd5 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 3 Oct 2025 17:35:47 +0100 Subject: [PATCH] Fix a46a3a97f3: Incorrect parameter order for CmdSetCompanyManagerFace. Style and bits were mixed up. Switch everything to style first, as the most significant parameter. --- src/company_cmd.cpp | 6 +++--- src/company_gui.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index e9fc5f94ff..ef62b91538 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -925,7 +925,7 @@ CommandCost CmdCompanyCtrl(DoCommandFlags flags, CompanyCtrlAction cca, CompanyI if (!_company_manager_face.empty()) { auto cmf = ParseCompanyManagerFaceCode(_company_manager_face); if (cmf.has_value()) { - Command::SendNet(STR_NULL, c->index, cmf->bits, cmf->style); + Command::SendNet(STR_NULL, c->index, cmf->style, cmf->bits); } } @@ -1050,11 +1050,11 @@ CommandCost CmdCompanyAllowListCtrl(DoCommandFlags flags, CompanyAllowListCtrlAc /** * Change the company manager's face. * @param flags operation to perform - * @param bits The bits of company manager face. * @param style The style of the company manager face. + * @param bits The bits of company manager face. * @return the cost of this operation or an error */ -CommandCost CmdSetCompanyManagerFace(DoCommandFlags flags, uint32_t bits, uint style) +CommandCost CmdSetCompanyManagerFace(DoCommandFlags flags, uint style, uint32_t bits) { CompanyManagerFace tmp_face{style, bits, {}}; if (!IsValidCompanyManagerFace(tmp_face)) return CMD_ERROR; diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 66dc383cbb..bf336ed35a 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1384,7 +1384,7 @@ public: /* OK button */ case WID_SCMF_ACCEPT: - Command::Post(this->face.bits, this->face.style); + Command::Post(this->face.style, this->face.bits); [[fallthrough]]; /* Cancel button */