From faee3b4bc3bb94e1fdf924a2bec4a863fb1638b8 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 28 Oct 2019 10:57:51 -0700 Subject: [PATCH] wasmtime-api: reserve_exact on the correct vector (#452) Fix what looks like a copy-paste issue in wasmtime-api/src/module.rs, which led to calling reserve_exact on one vector before pushing that many elements into another. --- wasmtime-api/src/module.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasmtime-api/src/module.rs b/wasmtime-api/src/module.rs index db58f3e1a5..9d20d1dc8f 100644 --- a/wasmtime-api/src/module.rs +++ b/wasmtime-api/src/module.rs @@ -91,7 +91,7 @@ fn read_imports_and_exports( } SectionCode::Function => { let section = section.get_function_section_reader()?; - sigs.reserve_exact(section.get_count() as usize); + func_sig.reserve_exact(section.get_count() as usize); for entry in section { func_sig.push(entry?); }