mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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:
@@ -85,7 +85,7 @@ void CleanupBlockRevFiles()
|
||||
// start removing block files.
|
||||
int nContigCounter = 0;
|
||||
for (const std::pair<const std::string, fs::path>& item : mapBlockFiles) {
|
||||
if (atoi(item.first) == nContigCounter) {
|
||||
if (LocaleIndependentAtoi<int>(item.first) == nContigCounter) {
|
||||
nContigCounter++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user