Altough reading vector data isn't currently supported, there is no reason
to abort reading the entire file when encountering a vector line in $dumpvars.

Signed-off-by: Josef Gajdusek <a...@atx.name>
---
 src/input/vcd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/vcd.c b/src/input/vcd.c
index 7614ba68..8be1ce40 100644
--- a/src/input/vcd.c
+++ b/src/input/vcd.c
@@ -453,6 +453,12 @@ static void parse_contents(const struct sr_input *in, char 
*data)
                         */
                        if (!tokens[i][1] || tokens[i][2] || !tokens[++i]) {
                                sr_dbg("Unexpected vector format!");
+                               if (!tokens[++i])
+                                       /* No tokens left, bail out */
+                                       break;
+                               else
+                                       /* Process next token */
+                                       continue;
                                break;
                        }
 
-- 
2.18.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to