diff --git a/LLama/Common/FixedSizeQueue.cs b/LLama/Common/FixedSizeQueue.cs index d39c1f28..73dde213 100644 --- a/LLama/Common/FixedSizeQueue.cs +++ b/LLama/Common/FixedSizeQueue.cs @@ -31,7 +31,7 @@ namespace LLama.Common public FixedSizeQueue(int size, IEnumerable data) { // Try an early check on the amount of data supplied (if possible) - if (data.TryGetNonEnumeratedCount(out var count)) + if (data.TryGetNonEnumeratedCount(out var count) && count > size) throw new ArgumentException($"The max size set for the quene is {size}, but got {count} initial values."); // Size of "data" is unknown, copy it all into a list