diff options
Diffstat (limited to 'src/rust/tor_allocate/tor_allocate.rs')
-rw-r--r-- | src/rust/tor_allocate/tor_allocate.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rust/tor_allocate/tor_allocate.rs b/src/rust/tor_allocate/tor_allocate.rs index 682a524ee7..7b35e2451f 100644 --- a/src/rust/tor_allocate/tor_allocate.rs +++ b/src/rust/tor_allocate/tor_allocate.rs @@ -60,7 +60,7 @@ pub fn allocate_and_copy_string(src: &str) -> *mut c_char { unsafe { ptr::copy_nonoverlapping(bytes.as_ptr(), dest, size) }; // set the last byte as null, using the ability to index into a slice - // rather than doing pointer arithmatic + // rather than doing pointer arithmetic let slice = unsafe { slice::from_raw_parts_mut(dest, size_with_null_byte) }; slice[size] = 0; // add a null terminator |