From 2874914bcb45747b758508acd6a5884bfb206e8b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 4 Nov 2016 07:46:30 +0100 Subject: [PATCH] Fixed anonymous genblock object names --- frontends/ast/simplify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 9d5c75fed..3432c61da 100644 --- 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); -- 2.30.2