summaryrefslogtreecommitdiff
path: root/src/pkg/big/int.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/big/int.go')
-rwxr-xr-xsrc/pkg/big/int.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/big/int.go b/src/pkg/big/int.go
index dd9179660..a74028fd7 100755
--- a/src/pkg/big/int.go
+++ b/src/pkg/big/int.go
@@ -434,8 +434,9 @@ func (z *Int) BitLen() int {
// See Knuth, volume 2, section 4.6.3.
func (z *Int) Exp(x, y, m *Int) *Int {
if y.neg || len(y.abs) == 0 {
+ neg := x.neg
z.SetInt64(1)
- z.neg = x.neg
+ z.neg = neg
return z
}