Browse files

Merge branch 'stable'

  • Loading branch information...
2 parents aa7f8e7 + 935d724 commit 0467bdef547bc97647e9642dcd6761d55cbdde49 @meebey committed Apr 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
View
4 src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
@@ -1311,7 +1311,9 @@ private IList<string> SplitMessage(string command, string target, string message
if (nextChar != " ") {
// we split in the middle of a word, split it better!
int lastWordPos = chunk.LastIndexOf(" ");
- if (lastWordPos != -1) {
+ if (lastWordPos > 0) {
+ // the chunk has to get smaller, else we run into an
+ // endless loop
chunk = chunk.Substring(0, lastWordPos);
}
}

0 comments on commit 0467bde

Please sign in to comment.