Skip to content

Commit b0b05a5

Browse files
committed
strchr bug fixed
1 parent 0b2db02 commit b0b05a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/strchr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{CChar, CInt};
1010
pub unsafe extern "C" fn strchr(haystack: *const CChar, needle: CInt) -> *const CChar {
1111
for idx in 0.. {
1212
let ptr = haystack.offset(idx);
13-
if needle == (*ptr) as i32 {
13+
if needle == (*ptr) as CInt {
1414
return ptr;
1515
}
1616
if (*ptr) == 0 {

0 commit comments

Comments
 (0)