This commit is contained in:
Andrey 2022-09-07 15:36:50 -04:00
parent 141a6f3f1e
commit 52ad9ced0b
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ function setBitRange(data, totalBitIndex, bitWidth, value) \
if (bitInByteIndex + bitWidth > 8) then \
bitsToHandleNow = 8 - bitInByteIndex \
setBitRange(data, totalBitIndex + bitsToHandleNow, bitWidth - bitsToHandleNow, value >> bitsToHandleNow) \
bitWidth = bitsToHandleNow; \
bitWidth = bitsToHandleNow \
end \
mask = (1 << bitWidth) - 1 \
data[1 + byteIndex] = data[1 + byteIndex] & (~(mask << bitInByteIndex)) \