Skip to content

Commit d09c690

Browse files
committed
Fix inequality in assertion
1 parent 6165346 commit d09c690

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sdl2/audio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ impl AudioCVT {
10241024
panic!("Failed SDL_malloc needed for SDL_ConvertAudio");
10251025
}
10261026
// raw.buf is dst_size long, but we want to copy into only the first src.len bytes.
1027-
assert!(src.len() < dst_size);
1027+
assert!(src.len() <= dst_size);
10281028
std::slice::from_raw_parts_mut(raw.buf, src.len()).copy_from_slice(src.as_ref());
10291029

10301030
let ret = sys::SDL_ConvertAudio(&mut raw);

0 commit comments

Comments
 (0)