Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Nov 15, 2023
1 parent 9f90c69 commit 13a2726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capnp/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ where
let mut total_body_words = u32::from_le_bytes(buffer[4..8].try_into().unwrap());
let mut num_segment_counts_read = 1;
while num_segment_counts_read < segment_count {
let start = num_segment_counts_read * 8;
let start = (num_segment_counts_read + 1) * 4;
let end = start + 8;
if buffer.len() < end {
return Err(Error::from_kind(ErrorKind::BufferNotLargeEnough));
Expand Down

0 comments on commit 13a2726

Please sign in to comment.