Skip to content

Commit

Permalink
Auto merge of #4404 - daira:fix-reindex-divby0, r=ebfull
Browse files Browse the repository at this point in the history
Avoid a theoretical possibility of division-by-zero introduced in #4368

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
zkbot committed Mar 16, 2020
2 parents 5a62631 + b49cdee commit fc9d0fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
nFile++;
fullSize += boost::filesystem::file_size(blkFile);
}
nFullSizeToReindex = fullSize;
nFullSizeToReindex = std::max<size_t>(1, fullSize);
nFile = 0;
while (true) {
CDiskBlockPos pos(nFile, 0);
Expand Down

0 comments on commit fc9d0fa

Please sign in to comment.