Avoid a theoretical possibility of division-by-zero introduced in #4368.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-03-16 14:56:38 +00:00
parent c7f1ec471e
commit b49cdee878
1 changed files with 1 additions and 1 deletions

View File

@ -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);