From b4d2bc2f3fe925a78a7e1ea061106b1f01e8dba2 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Thu, 22 Sep 2016 17:39:20 -0700 Subject: parse tests for {im,ex}porting tables, etc. --- src/wasm-binary-writer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wasm-binary-writer.c') diff --git a/src/wasm-binary-writer.c b/src/wasm-binary-writer.c index 339a0655..6d3653e4 100644 --- a/src/wasm-binary-writer.c +++ b/src/wasm-binary-writer.c @@ -532,7 +532,8 @@ static void write_expr_list(Context* ctx, static void write_init_expr(Context* ctx, const WasmModule* module, const WasmExpr* expr) { - write_expr(ctx, module, NULL, expr); + if (expr) + write_expr(ctx, module, NULL, expr); write_opcode(&ctx->stream, WASM_OPCODE_END); } -- cgit v1.2.3