Skip to content

Commit 407341f

Browse files
committed
fix bug i introduced in previous commit
1 parent 12bf4ec commit 407341f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func (bw *bitWriter) write(b byte) error {
203203

204204
bw.buf[byteNum] = bw.buf[byteNum] + sliceByteLen(b, bStart, left)
205205
// bStart + left is up to where b has been read from. (bw.chunkLen+bitNum) - 8 is how many bits go to the next byte.
206-
bw.buf[byteNum+1] = sliceByteLen(b, bStart+left, bw.chunkLen-left) << (bStart - left) // simplified 8 - (bw.chunkLen + bitNum - 8)
206+
bw.buf[byteNum+1] = sliceByteLen(b, bStart+left, bw.chunkLen-left) << (bStart + left) // simplified 8 - (bw.chunkLen + bitNum - 8)
207207
} else {
208208
bw.buf[byteNum] = bw.buf[byteNum] + (b << (8 - (bitNum + bw.chunkLen)))
209209
}

0 commit comments

Comments
 (0)