diff --git a/iceoryx2-bb/container/src/semantic_string.rs b/iceoryx2-bb/container/src/semantic_string.rs index 88214840e..fe291a540 100644 --- a/iceoryx2-bb/container/src/semantic_string.rs +++ b/iceoryx2-bb/container/src/semantic_string.rs @@ -153,7 +153,7 @@ pub trait SemanticString: /// unsafe fn from_c_str(ptr: *const std::ffi::c_char) -> Result { Self::new(std::slice::from_raw_parts( - ptr as *const u8, + ptr.cast(), strnlen(ptr, CAPACITY + 1), )) }