Skip to content

Commit 149f134

Browse files
vbabaninstIncMale
andauthored
Update bson/src/main/org/bson/io/ByteBufferBsonInput.java
Co-authored-by: Valentin Kovalenko <[email protected]>
1 parent 8a5ce2d commit 149f134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/src/main/org/bson/io/ByteBufferBsonInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private int computeCStringLength(final int prevPos) {
203203
*/
204204
long mask = chunk - 0x0101010101010101L;
205205
/*
206-
mask will only have the most significant bit set iff it was a 0x00 byte (0x00 becomes 0xFF because of the borrow).
206+
mask will only have the most significant bit in each byte set iff it was a 0x00 byte (0x00 becomes 0xFF because of the borrow).
207207
~chunk will have bits that were originally 0 set to 1.
208208
mask & ~chunk will have the most significant bit in each byte set iff original byte was 0x00.
209209
*/

0 commit comments

Comments
 (0)