swf: Pre-allocate the parameters when parsing a `TypeName`

This commit is contained in:
David Wendt 2021-07-27 17:42:59 -04:00 committed by kmeisthax
parent bf4492c454
commit 535f4fba58
1 changed files with 1 additions and 1 deletions

View File

@ -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()?);