]> sigrok.org Git - libsigrok.git/blobdiff - src/input/vcd.c
input: vcd: properly bail out on missing identifiers
[libsigrok.git] / src / input / vcd.c
index e4a4e7278062169f27a01149fc811c1e6d1542cc..91c22fcaea30df775d6726f25cdc45e29afa582c 100644 (file)
@@ -418,9 +418,10 @@ static void parse_contents(const struct sr_input *in, char *data)
                         * there was whitespace after the bit, the next token.
                         */
                        if (tokens[i][1] == '\0') {
-                               if (!tokens[++i])
-                                       /* Missing identifier */
-                                       continue;
+                               if (!tokens[++i]) {
+                                       sr_dbg("Identifier missing!");
+                                       break;
+                               }
                        } else {
                                for (j = 1; tokens[i][j]; j++)
                                        tokens[i][j - 1] = tokens[i][j];