Codechange: pass (uint) money as Money for CmdGiveMoney
This commit is contained in:
@@ -2646,10 +2646,8 @@ struct CompanyWindow : Window
|
||||
default: NOT_REACHED();
|
||||
|
||||
case WID_C_GIVE_MONEY: {
|
||||
Money money = (Money)(std::strtoull(str, nullptr, 10) / _currency->rate);
|
||||
uint32 money_c = Clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0
|
||||
|
||||
Command<CMD_GIVE_MONEY>::Post(STR_ERROR_CAN_T_GIVE_MONEY, money_c, (CompanyID)this->window_number);
|
||||
Money money = std::strtoull(str, nullptr, 10) / _currency->rate;
|
||||
Command<CMD_GIVE_MONEY>::Post(STR_ERROR_CAN_T_GIVE_MONEY, money, (CompanyID)this->window_number);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user