mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-04 06:12:07 +01:00
Replace use of locale dependent atoi(…) with locale-independent std::from_chars(…) (C++17)
test: Add test cases for LocaleIndependentAtoi fuzz: Assert legacy atoi(s) == LocaleIndependentAtoi<int>(s) fuzz: Assert legacy atoi64(s) == LocaleIndependentAtoi<int64_t>(s)
This commit is contained in:
@@ -702,7 +702,7 @@ static RPCHelpMan getblocktemplate()
|
||||
std::string lpstr = lpval.get_str();
|
||||
|
||||
hashWatchedChain = ParseHashV(lpstr.substr(0, 64), "longpollid");
|
||||
nTransactionsUpdatedLastLP = atoi64(lpstr.substr(64));
|
||||
nTransactionsUpdatedLastLP = LocaleIndependentAtoi<int64_t>(lpstr.substr(64));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user