summaryrefslogtreecommitdiff
path: root/frontends/ast/ast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/ast/ast.cc')
-rw-r--r--frontends/ast/ast.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc
index f7a39cf1..3e9ea50a 100644
--- a/frontends/ast/ast.cc
+++ b/frontends/ast/ast.cc
@@ -661,7 +661,7 @@ AstNode *AstNode::mkconst_bits(const std::vector<RTLIL::State> &v, bool is_signe
node->integer |= (node->bits.back() == RTLIL::S1) << i;
}
node->range_valid = true;
- node->range_left = node->bits.size();
+ node->range_left = node->bits.size()-1;
node->range_right = 0;
return node;
}