feat(Go-Tool):2020/12/16: 修复bitStore越位溢出的问题

This commit is contained in:
Huangzj
2020-12-16 15:29:37 +08:00
parent ed5a3d19ed
commit 4b542c3cee
3 changed files with 42 additions and 1 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ func (bitStore *BitStore) checkGearRight(gear int) {
//获取当前档位对应的数组长度(这边的length是从1开始的.)
func (bitStore *BitStore) getGearListLength(gear int) int {
return (gear + bit - 1) / bit
return (gear + bit) / bit
}
//获取档位所在的二进制位置