From 070b3c7fabf2ffb0ff4435098f1547b7b7dfdaf9 Mon Sep 17 00:00:00 2001 From: Ed Gonzalez Date: Tue, 17 Mar 2015 11:18:23 -0500 Subject: [PATCH] Correctly parse incoming waveform status strings by searching for double-quotes --- pc/CODEC2 GUI/CODEC2 GUI/Form1.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs b/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs index 2a69bd4..70746f7 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs @@ -298,12 +298,12 @@ namespace CODEC2_GUI // did we find beginning quotes? if(start_pos < 0) return; // no -- return - /*int end_pos = status.LastIndexOf("\""); + int end_pos = status.LastIndexOf("\""); // did we find ending quotes? if(end_pos == start_pos) return; // no -- return - */ + start_pos += 1; // ignore beginning quotes - string value = status.Substring(start_pos); + string value = status.Substring(start_pos,end_pos - start_pos); // handle the remapped spaces value = value.Replace("\u007f", " ");