Allow entry of numbers up to 10 million in string_to_money

This commit is contained in:
Gymnasiast 2019-04-20 18:42:06 +02:00
parent abf416a5a9
commit 28ad78f204
1 changed files with 1 additions and 1 deletions

View File

@ -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);