Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit f7eef5c

Browse files
thefringeninjadamianh
authored andcommitted
fixed ArgumentOutOfRangeException in InMemoryStreamStore implementation
1 parent 9323654 commit f7eef5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SqlStreamStore/InMemory/InMemoryStreamStore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ protected override Task<ReadStreamPage> ReadStreamBackwardsInternal(
589589

590590
var messages = new List<StreamMessage>();
591591
var i = fromVersionInclusive == StreamVersion.End ? stream.Messages.Count - 1 : fromVersionInclusive;
592-
while (i >= 0 && count > 0)
592+
while (i < stream.Messages.Count && i >= 0 && count > 0)
593593
{
594594
var inMemorymessage = stream.Messages[i];
595595
StreamMessage message;

0 commit comments

Comments
 (0)