Skip to content

Commit

Permalink
more unsafe ??!???
Browse files Browse the repository at this point in the history
  • Loading branch information
nothendev committed Oct 8, 2023
1 parent 6a66458 commit 840f269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl PlayerNet {
};
trace!(?buf, ?spack, "recving packet");
s_recv.send_async(spack).await?;
buf.fill(0);
unsafe { std::ptr::write_bytes(buf.as_mut().as_mut_ptr(), 0u8, buf.len()) };
}
}
.await?;
Expand Down

0 comments on commit 840f269

Please sign in to comment.