fix: clamp file offsets to file size

This commit is contained in:
Anna 2022-12-16 10:01:51 -05:00
parent 7e1201a0d0
commit 40c296224a
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ impl MpdEncoder {
};
let mip_size = if next == 0 {
size as u32 - offset
size as u32 - offset.min(size as u32)
} else {
next - offset
};