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

minor prop bit count cleanup

This commit is contained in:
Robin Appelman 2023-09-08 16:33:57 +02:00
commit 5e771e57c2

View file

@ -549,12 +549,10 @@ impl TryFrom<&RawSendPropDefinition> for SendPropParseDefinition {
)?, )?,
}), }),
SendPropType::Array => { SendPropType::Array => {
let count_bit_count = log_base2( let element_count = definition
definition
.element_count .element_count
.ok_or(MalformedSendPropDefinitionError::UnsizedArray)?, .ok_or(MalformedSendPropDefinitionError::UnsizedArray)?;
) as u16 let count_bit_count = log_base2(element_count) as u16 + 1;
+ 1;
let child_definition = definition let child_definition = definition
.array_property .array_property
.as_deref() .as_deref()