mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
util: Fail to parse empty string in ParseMoney
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user