Explicitly check split end >= start

Fixes #48
This commit is contained in:
Luke Street 2024-04-30 18:03:59 -06:00
parent fdafe59e13
commit dac2dcfc9e
1 changed files with 1 additions and 0 deletions

View File

@ -680,6 +680,7 @@ where R: BufRead + ?Sized {
skip,
}),
) => {
ensure!(end >= start, "Invalid split range {:#X}..{:#X}", start, end);
let (section_index, _) = match obj.sections.by_name(&name)? {
Some(v) => Ok(v),
None => {