Skip to content

Commit f492269

Browse files
Merge pull request #5 from c5soft/master
strchr bug fixed
2 parents 0b2db02 + b0b05a5 commit f492269

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)