util: Fail to parse empty string in ParseMoney

This commit is contained in:
MarcoFalke
2020-02-29 00:29:04 +07:00
parent fab30b61eb
commit 8888461f68
2 changed files with 10 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ bool ParseMoney(const std::string& str, CAmount& nRet)
return false;
}
if (str.empty()) {
return false;
}
std::string strWhole;
int64_t nUnits = 0;
const char* p = str.c_str();