diff --git a/src/window_draw_list.rs b/src/window_draw_list.rs index 4790b5f..b9f6f18 100644 --- a/src/window_draw_list.rs +++ b/src/window_draw_list.rs @@ -216,10 +216,12 @@ impl<'ui> WindowDrawList<'ui> { C: Into, T: AsRef, { + use std::os::raw::c_char; + let text = text.as_ref(); unsafe { - let start = text.as_ptr() as *const i8; - let end = (start as usize + text.len()) as *const i8; + let start = text.as_ptr() as *const c_char; + let end = (start as usize + text.len()) as *const c_char; sys::ImDrawList_AddText(self.draw_list, pos.into(), col.into().into(), start, end) } }