Skip to content

Commit

Permalink
de_net: Fix an assert (#745)
Browse files Browse the repository at this point in the history
Fixes #743.
  • Loading branch information
Indy2222 authored Sep 24, 2023
1 parent 12444d7 commit 31b1cad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/net/src/connection/databuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl DataBuf {

let data_index = slot.data_offset.wrapping_sub(front.data_offset);

assert!(buf.len() > slot.len);
assert!(buf.len() >= slot.len);

for (source, target) in self.data.range(data_index..data_index + slot.len).zip(buf) {
*target = *source;
Expand Down

0 comments on commit 31b1cad

Please sign in to comment.