We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeb513b commit 283e475Copy full SHA for 283e475
pkg/bool_array/array.go
@@ -59,6 +59,7 @@ func (x *BoolArray) Set(index int, v bool) *BoolArray {
59
byteValue := byte(if_expression.Return(v, 1, 0))
60
// 除了offset其它位置都原样拷贝
61
oldByte := x.values[targetIndex] ^ (1 << offset)
62
+ // 然后再把offset位置的新的值设置上
63
newByte := oldByte | (byteValue << offset)
64
x.values[targetIndex] = newByte
65
return x
0 commit comments