Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2006-08-14 05:52:12 +0400
committerMiguel de Icaza <miguel@gnome.org>2006-08-14 05:52:12 +0400
commit316a21e01594ff4caf57b098c8c3e51ea75e3088 (patch)
tree6c6807be803eb4ed7f2bacd375e735136963e608 /mcs/class/System/System.IO.Ports
parentd82e3e883c470bde12709aa759d21a246e819e72 (diff)
Condition when we reset
svn path=/trunk/mcs/; revision=63695
Diffstat (limited to 'mcs/class/System/System.IO.Ports')
-rw-r--r--mcs/class/System/System.IO.Ports/SerialPort.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/System/System.IO.Ports/SerialPort.cs b/mcs/class/System/System.IO.Ports/SerialPort.cs
index 1dad19650bd..197fa11759d 100644
--- a/mcs/class/System/System.IO.Ports/SerialPort.cs
+++ b/mcs/class/System/System.IO.Ports/SerialPort.cs
@@ -611,8 +611,9 @@ namespace System.IO.Ports
current++;
if (current == byte_value.Length)
return encoding.GetString (seen.ToArray (), 0, seen.Count - byte_value.Length);
- } else
- current = 0;
+ } else {
+ current = (byte_value [0] == n) ? 1 : 0;
+ }
}
return encoding.GetString (seen.ToArray ());
}