mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
fix str::eq_slice off-by-one error
This commit is contained in:
parent
2d690ae43f
commit
21172ee280
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user