1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

fix truncated demos during reencode

This commit is contained in:
Robin Appelman 2021-08-29 18:28:26 +02:00
commit 10429c6d29
3 changed files with 65 additions and 12 deletions

View file

@ -6,8 +6,8 @@ use crate::ReadResult;
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, BitWrite, PartialEq, Serialize, Deserialize, Clone)]
pub struct ConVar {
key: String,
value: String,
pub key: String,
pub value: String,
}
impl<E: Endianness> BitRead<'_, E> for ConVar {
@ -25,9 +25,9 @@ impl<E: Endianness> BitRead<'_, E> for ConVar {
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, BitRead, PartialEq, Serialize, Deserialize, Clone)]
pub struct SetConVarMessage {
length: u8,
pub length: u8,
#[size = "length"]
vars: Vec<ConVar>,
pub vars: Vec<ConVar>,
}
impl<E: Endianness> BitWrite<E> for SetConVarMessage {