Skip to content

Commit

Permalink
Avoid a theoretical possibility of division-by-zero introduced in zca…
Browse files Browse the repository at this point in the history
…sh#4368.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Mar 16, 2020
1 parent c7f1ec4 commit b49cdee
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 b49cdee

Please sign in to comment.