Skip to content

Commit

Permalink
Fix coupled message thinking there is content after end of message1
Browse files Browse the repository at this point in the history
  • Loading branch information
occluder committed Oct 7, 2023
1 parent 24b80a1 commit 4096dcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MiniTwitch.Irc/Internal/Models/IrcMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ public IrcMessage(ReadOnlyMemory<byte> memory)
this.ChannelRange = channelStart..span.Length;
return;
}
else if (span[channelEnd] == cr)

this.ChannelRange = channelStart..channelEnd;
if (span[channelEnd] == cr)
{
this.IsMultipleMessages = true;
this.NextMessageStartIndex = channelEnd + 2;
return;
}

this.ChannelRange = channelStart..channelEnd;
contentStart = channelEnd + 2;
}

Expand Down

0 comments on commit 4096dcf

Please sign in to comment.