mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-05 02:54:10 +02:00
better skips
This commit is contained in:
parent
b7c3baee17
commit
f5504cd682
4 changed files with 25 additions and 27 deletions
|
|
@ -297,6 +297,10 @@ impl BitRead<LittleEndian> for SendPropFlags {
|
|||
// since all 16 bits worth of flags are used there are no invalid flags
|
||||
Ok(SendPropFlags(BitFlags::from_bits_truncate(stream.read()?)))
|
||||
}
|
||||
|
||||
fn bit_size() -> Option<usize> {
|
||||
Some(16)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -400,7 +404,6 @@ impl SendPropValue {
|
|||
.map(|int| int as i64)
|
||||
} else if definition.flags.contains(SendPropFlag::Unsigned) {
|
||||
let unsigned: u32 = stream.read_sized(definition.bit_count.unwrap_or(32) as usize)?;
|
||||
//const MAX: u32 = std::i32::MAX as u32;
|
||||
Ok(unsigned as i64)
|
||||
} else {
|
||||
stream
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue