Skip to content

Commit 8f02375

Browse files
committed
Serial Plotter: Don't try to parse line containing only trimmable characters
1 parent b551bf5 commit 8f02375

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/processing/app/SerialPlotter.java

+4
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ public void message(final String s) {
289289
messageBuffer.delete(0, linebreak + 1);
290290

291291
line = line.trim();
292+
if (line.length() == 0) {
293+
// the line only contained trimmable characters
294+
continue;
295+
}
292296
String[] parts = line.split("[, \t]+");
293297
if(parts.length == 0) {
294298
continue;

0 commit comments

Comments
 (0)