Update lib.rs

This commit is contained in:
Justin Raymond
2018-03-10 12:39:30 -05:00
committed by GitHub
parent 23a409204f
commit 63ee4de162
+1 -1
View File
@@ -259,7 +259,7 @@ 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 mut i = len - 1;
while *s.offset(i) != 0 && i >= 0 {
while i >= 0 {
if *s.offset(i) == c {
return s.offset(i) as *mut c_char;
}