summaryrefslogtreecommitdiff
path: root/src/math/big/int.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/big/int.go')
-rw-r--r--src/math/big/int.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/big/int.go b/src/math/big/int.go
index d22e39e7c..ade5c2fc8 100644
--- a/src/math/big/int.go
+++ b/src/math/big/int.go
@@ -887,7 +887,7 @@ func (z *Int) AndNot(x, y *Int) *Int {
}
// x &^ (-y) == x &^ ^(y-1) == x & (y-1)
- y1 := nat(nil).add(y.abs, natOne)
+ y1 := nat(nil).sub(y.abs, natOne)
z.abs = z.abs.and(x.abs, y1)
z.neg = false
return z