Skip to content

Commit

Permalink
fix off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteFoy committed Dec 31, 2024
1 parent b6d3078 commit 8ce380c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddcommon-ffi/src/cstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl CString {
pub fn as_cstr(&self) -> CStr<'_> {
CStr {
ptr: self.ptr,
length: self.length,
length: self.length+1, // +1 for the null terminator
_lifetime_marker: PhantomData,
}
}
Expand Down

0 comments on commit 8ce380c

Please sign in to comment.