Fix BigMax to return the biggest number, not the smallest
This commit is contained in:
parent
2995d6c281
commit
2e6cf42011
@ -68,8 +68,8 @@ func BigCopy(src *big.Int) *big.Int {
|
|||||||
// Returns the maximum size big integer
|
// Returns the maximum size big integer
|
||||||
func BigMax(x, y *big.Int) *big.Int {
|
func BigMax(x, y *big.Int) *big.Int {
|
||||||
if x.Cmp(y) <= 0 {
|
if x.Cmp(y) <= 0 {
|
||||||
return x
|
return y
|
||||||
}
|
}
|
||||||
|
|
||||||
return y
|
return x
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user