Fixed AST_CONSTANT node generation
authorClifford Wolf <clifford@clifford.at>
Sun, 7 Jul 2013 13:40:26 +0000 (15:40 +0200)
committerClifford Wolf <clifford@clifford.at>
Sun, 7 Jul 2013 13:40:26 +0000 (15:40 +0200)
frontends/ast/ast.cc

index f7a39cf19ae542bbffa939b5fd5c3e86fd8c0c69..3e9ea50acb55c0f42f4d8435fde7eb35f1ac23b1 100644 (file)
@@ -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;
 }