Skip to content

Commit

Permalink
rlibc: fix bug in memcmp()
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper authored and alexcrichton committed Jul 21, 2014
1 parent a491551 commit fcaee85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librlibc/lib.rs
Expand Up @@ -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;
}
Expand Down

0 comments on commit fcaee85

Please sign in to comment.