mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
fix handling of some saytext2 messages
This commit is contained in:
parent
a3fc003437
commit
e2a631cef3
4 changed files with 2 additions and 1 deletions
BIN
data/saytext2.dem
Normal file
BIN
data/saytext2.dem
Normal file
Binary file not shown.
1
data/saytext2.json
Normal file
1
data/saytext2.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -177,7 +177,6 @@ impl BitRead<'_, LittleEndian> for SayText2Message {
|
|||
let kind = stream.read()?;
|
||||
let from = stream.read().or_else(handle_utf8_error)?;
|
||||
let text = stream.read().or_else(handle_utf8_error)?;
|
||||
stream.skip_bits(16)?;
|
||||
(kind, Some(from), text)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use tf_demo_parser::{Demo, DemoParser, MatchState};
|
|||
#[test_case("data/unicode-saytext.dem", "data/unicode-saytext.json"; "unicode-saytext.dem")]
|
||||
#[test_case("data/nousers.dem", "data/nousers.json"; "nousers.dem")]
|
||||
#[test_case("data/decal.dem", "data/decal.json"; "decal.dem")]
|
||||
#[test_case("data/saytext2.dem", "data/saytext2.json"; "saytext2.dem")]
|
||||
fn snapshot_test(input_file: &str, snapshot_file: &str) {
|
||||
let file = fs::read(input_file).expect("Unable to read file");
|
||||
let demo = Demo::new(&file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue