Changed \n from string to character representation

This commit is contained in:
Michael Cramer 2018-03-26 16:10:29 -07:00
parent 9b92917925
commit 8d7a23269e

View file

@ -133,7 +133,7 @@ namespace AsterNET.Manager
// \n - because not all dev in Digium use \r\n
// .Trim() kill \r
lock (((ICollection) lineQueue).SyncRoot)
while (!string.IsNullOrEmpty(mrReader.lineBuffer) && (idx = mrReader.lineBuffer.IndexOf("\n")) >= 0)
while (!string.IsNullOrEmpty(mrReader.lineBuffer) && (idx = mrReader.lineBuffer.IndexOf('\n')) >= 0)
{
line = idx > 0 ? mrReader.lineBuffer.Substring(0, idx).Trim() : string.Empty;
mrReader.lineBuffer = (idx + 1 < mrReader.lineBuffer.Length