summaryrefslogtreecommitdiff
path: root/src/binary-reader-opcnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-reader-opcnt.c')
-rw-r--r--src/binary-reader-opcnt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/binary-reader-opcnt.c b/src/binary-reader-opcnt.c
index 5db2cade..8d184e70 100644
--- a/src/binary-reader-opcnt.c
+++ b/src/binary-reader-opcnt.c
@@ -130,7 +130,11 @@ static WasmResult on_store_expr(WasmOpcode opcode,
}
static void on_error(WasmBinaryReaderContext* ctx, const char* message) {
- wasm_default_binary_error_callback(ctx->offset, message, ctx->user_data);
+ WasmDefaultErrorHandlerInfo info;
+ info.header = "error reading binary";
+ info.out_file = stdout;
+ info.print_header = WASM_PRINT_ERROR_HEADER_ONCE;
+ wasm_default_binary_error_callback(ctx->offset, message, &info);
}
static WasmBinaryReader s_binary_reader = {