feat(Go-Tool):修复bitstore计算position问题

This commit is contained in:
Huangzj
2020-12-28 16:11:42 +08:00
parent cdf5fa9f6b
commit 84b5787dd8
+1 -1
View File
@@ -78,7 +78,7 @@ func (bitStore *BitStore) getGearListLength(gear int) int {
//获取档位所在的二进制位置
func (bitStore *BitStore) getGearPosition(gear, length int) int {
return gear - (bit-1)*(length-1) - 1
return (gear - 1) % (bit - 1)
}
func (bitStore *BitStore) getSizeOrInit() int {