Fix building on targets with unsigned c_char

This commit is contained in:
bjorn3
2025-03-30 16:35:29 +02:00
parent 34c95ea662
commit 8650ac293e
9 changed files with 46 additions and 37 deletions
+1 -1
View File
@@ -620,7 +620,7 @@ pub unsafe extern "C" fn strpbrk(s1: *const c_char, s2: *const c_char) -> *mut c
#[no_mangle]
pub unsafe extern "C" fn strrchr(s: *const c_char, c: c_int) -> *mut c_char {
let len = strlen(s) as isize;
let c = c as i8;
let c = c as c_char;
let mut i = len - 1;
while i >= 0 {
if *s.offset(i) == c {