fix str::eq_slice off-by-one error

This commit is contained in:
Andrew Paseltiner 2012-09-03 13:44:37 -04:00 committed by Brian Anderson
parent 2d690ae43f
commit 21172ee280

View File

@ -668,7 +668,7 @@ pure fn eq_slice(a: &str, b: &str) -> bool {
unsafe {
libc::memcmp(ap as *libc::c_void,
bp as *libc::c_void,
alen as libc::size_t) == 0
(alen - 1) as libc::size_t) == 0
}
}
}