summaryrefslogtreecommitdiff
path: root/src/wasm-linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-linker.cpp')
-rw-r--r--src/wasm-linker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index 28fb7c22f..f50ecab7a 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -337,7 +337,8 @@ void Linker::emscriptenGlue(std::ostream& o) {
}
auto functionsToThunk = getTableData();
- std::remove(functionsToThunk.begin(), functionsToThunk.end(), dummyFunction);
+ auto removeIt = std::remove(functionsToThunk.begin(), functionsToThunk.end(), dummyFunction);
+ functionsToThunk.erase(removeIt, functionsToThunk.end());
for (auto f : emscripten::makeDynCallThunks(out.wasm, functionsToThunk)) {
exportFunction(f->name, true);
}