From 8b5a900ae16332e92511878a32e88d33904d5d6d Mon Sep 17 00:00:00 2001 From: xloem <0xloem@gmail.com> Date: Fri, 30 Sep 2016 17:04:01 -0400 Subject: [PATCH] Message parsing logic fix comparison was invalid if some parts were not parsable numbers --- app/src/processing/app/SerialPlotter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/SerialPlotter.java b/app/src/processing/app/SerialPlotter.java index 93dc5b662..ffe15ae44 100644 --- a/app/src/processing/app/SerialPlotter.java +++ b/app/src/processing/app/SerialPlotter.java @@ -241,7 +241,7 @@ public class SerialPlotter extends AbstractMonitor { for(int i = 0; i < parts.length; ++i) { try { double value = Double.valueOf(parts[i]); - if(i >= graphs.size()) { + if(validParts >= graphs.size()) { graphs.add(new Graph(validParts)); } graphs.get(validParts).buffer.add(value);