Open MinoruSekine opened 3 years ago
This addition to test occurs this issue.
Necessary solutions will be classified into some parts.
"1234567890123.456"
)"-1234567890123.456"
)"3.1415926535"
)FromStringToDecimalIntImpl()
doesn't check integral overflow by long string.
If cut too long string before conversion,
it have to recognize "it is too long or not".
Without cutting too long string before conversion, codes like below may recognize overflow will be occurred or not.
std::numeric_limits<T>::max() / next_digit < current_value
Describe the bug
"3.1415926535"
) makes invalidfixed_t
To Reproduce Steps to reproduce the behavior:
fixed_t
typed value like asfixed_t kPi("3.1415926535");
fixed_t
which has invalid valueExpected behavior
Environment (please complete the following information):
Additional context
195 will needs this fix