From 3ecfb3cfd36929a25da5decc4a413777442030dd Mon Sep 17 00:00:00 2001 From: Anders Holmbjerg Kristiansen Date: Wed, 8 Nov 2023 22:33:13 +0100 Subject: [PATCH] check table size greater than --- Snappier/Internal/HashTable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snappier/Internal/HashTable.cs b/Snappier/Internal/HashTable.cs index 0edae1a..c3320dd 100644 --- a/Snappier/Internal/HashTable.cs +++ b/Snappier/Internal/HashTable.cs @@ -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) {