mirror of https://github.com/OpenRCT2/OpenRCT2.git
Allow entry of numbers up to 10 million in string_to_money
This commit is contained in:
parent
abf416a5a9
commit
28ad78f204
|
@ -1513,7 +1513,7 @@ money32 string_to_money(const char* string_to_monetise)
|
|||
|
||||
auto number = std::stod(processedString, nullptr);
|
||||
number /= (currencyDesc->rate / 10.0);
|
||||
auto whole = static_cast<uint16_t>(number);
|
||||
auto whole = static_cast<int32_t>(number);
|
||||
auto fraction = static_cast<uint8_t>(ceil((number - whole) * 100.0));
|
||||
|
||||
money32 result = MONEY(whole, fraction);
|
||||
|
|
Loading…
Reference in New Issue