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 8bf0ab1 commit a8e8334Copy full SHA for a8e8334
bson/src/main/org/bson/io/ByteBufferBsonInput.java
@@ -215,8 +215,8 @@ private int computeCStringLength(final int prevPos) {
215
mask:
216
00000000 00000000 11111111 00000000 00000001 00000001 00000000 00000111
217
218
- ANDing mask with 0x8080808080808080 isolates the most significant bit (0x80) in positions where
219
- the original byte was 0x00, thereby setting the most significant bit to 1 only at the 0x00 byte position.
+ ANDing mask with 0x8080808080808080 isolates the most significant bit in each byte where
+ the original byte was 0x00, thereby setting the most significant bit to 1 in each 0x00 original byte.
220
221
result:
222
00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000
0 commit comments