]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Fixes an off-by-one defect introduced in #230
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Tue, 15 Sep 2009 13:57:42 +0000 (13:57 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Tue, 15 Sep 2009 13:57:42 +0000 (13:57 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@231 e59a4935-1847-0410-ae03-e826735625c1

src/simplifier/simplifier.cpp

index 75139428fc70728e143cfc94e48b4b52612b51f9..9db64188b6e7fd040c26d5b0d640de8dc5bd5264 100644 (file)
@@ -2159,8 +2159,8 @@ ASTNode Flatten(const ASTNode& a)
                                                else if (k == BVRIGHTSHIFT)
                                                {
                                                        ASTNode zero = CreateZeroConst(shift);
-                                                       ASTNode hi = CreateBVConst(32, width );
-                                                       ASTNode low = CreateBVConst(32, shift+1);
+                                                       ASTNode hi = CreateBVConst(32, width -1);
+                                                       ASTNode low = CreateBVConst(32, shift);
                                                        ASTNode extract = CreateTerm(BVEXTRACT, width - shift, a, hi, low);
                                                        BVTypeCheck(extract);
                                                        output = CreateTerm(BVCONCAT, width, zero, extract);