Skip to content

Commit

Permalink
Merge pull request #221 from eseiler/fix/sizes
Browse files Browse the repository at this point in the history
[FIX] Prevent division by 0
  • Loading branch information
eseiler authored Oct 19, 2023
2 parents e453b89 + b43ba7f commit 92f29f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/display_layout/sizes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ struct per_level_stats

for (size_t i = 0; i < number_of_levels; ++i)
{
assert(num_ibfs[i] > 0u);
load_factor[i] /= num_ibfs[i];
max_elements[i] /= num_ibfs[i];
tbs_too_many_elements[i] /= tbs_too_big[i];
tbs_too_many_elements[i] /= tbs_too_big[i] ? tbs_too_big[i] : 1u;
}
}

Expand Down

0 comments on commit 92f29f5

Please sign in to comment.