summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-04-16 18:13:41 +0200
committerClifford Wolf <clifford@clifford.at>2015-04-16 18:13:41 +0200
commitcfdc9fc50ed3280fb1e048bbf6125f009ab44403 (patch)
tree631d1243316c3137b65e3b0878c19f04b7372b0d
parent31755ed1cfe4516ddcad30847ed1b2b066bfdf8b (diff)
A "#" does start a comment, not a label.
-rw-r--r--kernel/yosys.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index 3076158b..7494b7e3 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -698,6 +698,9 @@ static void handle_label(std::string &command, bool &from_to_active, const std::
while (pos < GetSize(command) && (command[pos] == ' ' || command[pos] == '\t'))
pos++;
+ if (pos < GetSize(command) && command[pos] == '#')
+ return;
+
while (pos < GetSize(command) && command[pos] != ' ' && command[pos] != '\t' && command[pos] != '\r' && command[pos] != '\n')
label += command[pos++];