1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 10:14:06 +02:00

saytext2 fix

This commit is contained in:
Robin Appelman 2021-07-21 14:21:15 +02:00
commit 70fe69db21

View file

@ -258,8 +258,10 @@ impl BitRead<'_, LittleEndian> for SayText2Message {
let from = stream.read().or_else(handle_utf8_error)?;
let text = stream.read().or_else(handle_utf8_error)?;
// always ends with 2 0 bytes?
let _: u16 = stream.read()?;
// ends with 2 0 bytes?
if stream.bits_left() >= 16 {
let _: u16 = stream.read()?;
}
(kind, Some(from), text)
};