Skip to content

Commit

Permalink
Merge pull request #12 from DeathByNukes/master
Browse files Browse the repository at this point in the history
Use ordinal comparisons when parsing IRC messages. (Unicode bugfix)
  • Loading branch information
meebey committed Jun 13, 2015
2 parents ebf0360 + 309ad84 commit 1934fad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IrcClient/IrcClient.cs
Expand Up @@ -906,9 +906,9 @@ public IrcMessageData MessageParser(string rawline)
// conform to RFC 2812
from = linear[0];
messagecode = linear[1];
exclamationpos = from.IndexOf("!");
atpos = from.IndexOf("@");
colonpos = line.IndexOf(" :");
exclamationpos = from.IndexOf("!", StringComparison.Ordinal);
atpos = from.IndexOf("@", StringComparison.Ordinal);
colonpos = line.IndexOf(" :", StringComparison.Ordinal);
if (colonpos != -1) {
// we want the exact position of ":" not beginning from the space
colonpos += 1;
Expand Down

0 comments on commit 1934fad

Please sign in to comment.