diff --git a/src/strchr.rs b/src/strchr.rs index fc9a3a8..5b77ed6 100644 --- a/src/strchr.rs +++ b/src/strchr.rs @@ -10,7 +10,7 @@ use crate::{CChar, CInt}; pub unsafe extern "C" fn strchr(haystack: *const CChar, needle: CInt) -> *const CChar { for idx in 0.. { let ptr = haystack.offset(idx); - if needle == (*ptr) as i32 { + if needle == (*ptr) as CInt { return ptr; } if (*ptr) == 0 {