From d8229dcfa82a24809a17384df4220b4f3e70a82b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 21 Sep 2016 14:14:04 -0700 Subject: fix start section in binary format --- src/wasm-binary.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 85aaf9279..9dd0d60d6 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1714,8 +1714,8 @@ public: } // now that we have names for each function, apply things - if (startIndex != static_cast(-1) && startIndex < wasm.functions.size()) { - wasm.start = wasm.functions[startIndex]->name; + if (startIndex != static_cast(-1)) { + wasm.start = getFunctionIndexName(startIndex); } for (auto& iter : exportIndexes) { -- cgit v1.2.3