diff options
Diffstat (limited to 'src/pkg/big/int.go')
| -rwxr-xr-x | src/pkg/big/int.go | 3 |
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 } |
