[chronojump] Check on forceSensorCaptureDo port.ReadLine() has one '; '
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Check on forceSensorCaptureDo port.ReadLine() has one '; '
- Date: Sat, 10 Jun 2017 22:35:33 +0000 (UTC)
commit cefa6748fa4106eb3a9640d2fe0fc31f1da28330
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Jun 10 19:23:51 2017 -0300
Check on forceSensorCaptureDo port.ReadLine() has one ';'
src/gui/forceSensor.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 4eedaad..c8191a1 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -123,6 +123,10 @@ public partial class ChronoJumpWindow
{
str = port.ReadLine();
+ //check if there is one and only one ';'
+ if( ! (str.Contains(";") && str.IndexOf(";") == str.LastIndexOf(";")) )
+ continue;
+
string [] strFull = str.Split(new char[] {';'});
//LogB.Information("str: " + str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]