Skip to content

Commit

Permalink
check table size greater than
Browse files Browse the repository at this point in the history
  • Loading branch information
ak88 committed Nov 8, 2023
1 parent 6d4474f commit 3ecfb3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Snappier/Internal/HashTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void EnsureCapacity(int inputSize)
var maxFragmentSize = Math.Min(inputSize, (int) Constants.BlockSize);
var tableSize = CalculateTableSize(maxFragmentSize);

if (_buffer is null || tableSize < _buffer.Length)
if (_buffer is null || tableSize > _buffer.Length)
{
if (_buffer is not null)
{
Expand Down

0 comments on commit 3ecfb3c

Please sign in to comment.