fix: legacy dec power mut zero exponent precision (#16266)
This commit is contained in:
parent
995d2bc94b
commit
a2e3711ce0
@ -36,6 +36,10 @@ Ref: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.j
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#16266](https://github.com/cosmos/cosmos-sdk/pull/16266) fix: legacy dec power mut zero exponent precision.
|
||||
|
||||
## [math/v1.0.1](https://github.com/cosmos/cosmos-sdk/releases/tag/math/v1.0.1) - 2023-05-15
|
||||
|
||||
### Improvements
|
||||
|
||||
@ -490,7 +490,8 @@ func (d LegacyDec) Power(power uint64) LegacyDec {
|
||||
|
||||
func (d LegacyDec) PowerMut(power uint64) LegacyDec {
|
||||
if power == 0 {
|
||||
d.SetInt64(1)
|
||||
// Set to 1 with the correct precision.
|
||||
d.i.Set(precisionReuse)
|
||||
return d
|
||||
}
|
||||
tmp := LegacyOneDec()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user