projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3db2ac4
)
Fixed anonymous genblock object names
author
Clifford Wolf
<clifford@clifford.at>
Fri, 4 Nov 2016 06:46:30 +0000
(07:46 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Fri, 4 Nov 2016 06:46:30 +0000
(07:46 +0100)
frontends/ast/simplify.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/simplify.cc
b/frontends/ast/simplify.cc
index 9d5c75fedc2b4d31f2362d9f0a772ba84cac828b..3432c61dac7224b2e66be23b410bdebc0d4339f6 100644
(file)
--- a/
frontends/ast/simplify.cc
+++ b/
frontends/ast/simplify.cc
@@
-2660,7
+2660,7
@@
void AstNode::expand_genblock(std::string index_var, std::string prefix, std::ma
std::string new_name = prefix[0] == '\\' ? prefix.substr(1) : prefix;
size_t pos = child->str.rfind('.');
if (pos == std::string::npos)
- pos = child->str[0] == '\\' ? 1 : 0;
+ pos = child->str[0] == '\\'
&& prefix[0] == '\\'
? 1 : 0;
else
pos = pos + 1;
new_name = child->str.substr(0, pos) + new_name + child->str.substr(pos);