mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 18:54:05 +02:00
allow empty indexes
This commit is contained in:
parent
0850bb8dbd
commit
d526228740
1 changed files with 4 additions and 1 deletions
|
|
@ -513,7 +513,10 @@ impl Bsp {
|
|||
source: &'static str,
|
||||
target: &'static str,
|
||||
) -> BspResult<()> {
|
||||
let max = indexes.max().unwrap_or_default();
|
||||
let max = match indexes.max() {
|
||||
Some(max) => max,
|
||||
None => return Ok(()),
|
||||
};
|
||||
max.try_into()
|
||||
.ok()
|
||||
.and_then(|index| list.get(index))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue