1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00
This commit is contained in:
Robin Appelman 2019-03-03 00:29:39 +01:00
commit deb3375ac7
11 changed files with 97 additions and 32 deletions

View file

@ -13,7 +13,7 @@ impl BitRead<LittleEndian> for ConsoleCmdPacket {
let tick = stream.read_int(32)?;
let len = stream.read_int::<usize>(32)?;
let mut packet_data = stream.read_bits(len * 8)?;
let command = packet_data.read_string(None)?;
let command = packet_data.read_string(Some(len))?;
Ok(ConsoleCmdPacket { tick, command })
}
}

View file

@ -65,7 +65,7 @@ pub struct ExtraData {
pub data: Stream,
}
#[derive(BitRead, Clone)]
#[derive(BitRead, Clone, Default)]
#[endianness = "LittleEndian"]
pub struct StringTableEntry {
pub text: String,