ogg_pager 0.3.1

This commit is contained in:
Serial 2022-03-03 17:03:20 -05:00
parent 5bf1f342dc
commit 43631ee977
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "ogg_pager"
version = "0.3.0"
version = "0.3.1"
authors = ["Serial <69764315+Serial-ATA@users.noreply.github.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"

View file

@ -352,7 +352,10 @@ pub fn paginate(packet: &[u8], stream_serial: u32, abgp: u64, flags: u8) -> Vec<
///
/// `length` > [`MAX_CONTENT_SIZE`]
pub fn segment_table(length: usize) -> Result<Vec<u8>> {
let last_len = (length % 255) as u8;
let mut last_len = (length % 255) as u8;
if last_len == 0 {
last_len = 255;
}
let mut needed = length / 255;
if needed != 255 {