summaryrefslogtreecommitdiff
path: root/src/binary-writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r--src/binary-writer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index 687b117d..b0af2c35 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -398,7 +398,8 @@ void BinaryWriter::WriteExpr(const Module* module,
break;
}
case ExprType::CallIndirect: {
- Index index = module->GetFuncTypeIndex(cast<CallIndirectExpr>(expr)->var);
+ Index index =
+ module->GetFuncTypeIndex(cast<CallIndirectExpr>(expr)->decl);
WriteOpcode(stream_, Opcode::CallIndirect);
WriteU32Leb128WithReloc(index, "signature index",
RelocType::TypeIndexLEB);