swf: Pre-allocate the parameters when parsing a `TypeName`
This commit is contained in:
parent
bf4492c454
commit
535f4fba58
|
@ -174,7 +174,7 @@ impl<'a> Reader<'a> {
|
|||
0x1d => {
|
||||
let base_type = self.read_index()?;
|
||||
let count = self.read_u30()?;
|
||||
let mut parameters = Vec::new();
|
||||
let mut parameters = Vec::with_capacity(count as usize);
|
||||
|
||||
for _ in 0..count {
|
||||
parameters.push(self.read_index()?);
|
||||
|
|
Loading…
Reference in New Issue