mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Catch too many digits.
This commit is contained in:
@@ -275,6 +275,12 @@ bool STAmount::setValue(const std::string& sAmount)
|
||||
|
||||
try
|
||||
{
|
||||
if ((smMatch[2].length() + smMatch[4].length()) > 18)
|
||||
{
|
||||
cLog(lsWARNING) << "Overlong number: " << sAmount;
|
||||
return false;
|
||||
}
|
||||
|
||||
mIsNegative = (smMatch[1].matched && (smMatch[1] == "-"));
|
||||
|
||||
if (!smMatch[4].matched) // integer only
|
||||
|
||||
Reference in New Issue
Block a user