mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
parent
e2a631cef3
commit
4d87f5b279
1 changed files with 6 additions and 0 deletions
|
|
@ -48,6 +48,12 @@ impl<'a> Parse<'a> for CreateStringTableMessage<'a> {
|
||||||
let decompressed_size: u32 = table_data.read()?;
|
let decompressed_size: u32 = table_data.read()?;
|
||||||
let compressed_size: u32 = table_data.read()?;
|
let compressed_size: u32 = table_data.read()?;
|
||||||
|
|
||||||
|
if compressed_size < 4 {
|
||||||
|
return Err(ParseError::InvalidDemo(
|
||||||
|
"Invalid compressed string table size",
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
let magic = table_data.read_string(Some(4))?;
|
let magic = table_data.read_string(Some(4))?;
|
||||||
|
|
||||||
if magic != "SNAP" {
|
if magic != "SNAP" {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue