rlibc: fix bug in memcmp()
This commit is contained in:
parent
a491551597
commit
fcaee85ced
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ pub unsafe extern "C" fn memcmp(s1: *const u8, s2: *const u8, n: uint) -> i32 {
|
|||
let a = *offset(s1, i as int);
|
||||
let b = *offset(s2, i as int);
|
||||
if a != b {
|
||||
return (a - b) as i32
|
||||
return a as i32 - b as i32
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue