summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index decd78852..6cbf880e3 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -492,9 +492,10 @@ void WasmBinaryWriter::writeExports() {
o << U32LEB(getFunctionIndex(curr->value));
break;
case ExternalKind::Table:
- o << U32LEB(0);
+ o << U32LEB(getTableIndex(curr->value));
break;
case ExternalKind::Memory:
+ // TODO: fix with multi-memory
o << U32LEB(0);
break;
case ExternalKind::Global: