summaryrefslogtreecommitdiff
path: root/src/wasm-binary-reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary-reader.c')
-rw-r--r--src/wasm-binary-reader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-binary-reader.c b/src/wasm-binary-reader.c
index 21b2169d..950b6752 100644
--- a/src/wasm-binary-reader.c
+++ b/src/wasm-binary-reader.c
@@ -589,7 +589,7 @@ static void logging_on_error(WasmBinaryReaderContext* ctx,
FORWARD0(name); \
}
-LOGGING0(begin_module)
+LOGGING_UINT32(begin_module)
LOGGING0(end_module)
LOGGING_BEGIN(signature_section)
LOGGING_UINT32(on_signature_count)
@@ -1706,8 +1706,6 @@ WasmResult wasm_read_binary(WasmAllocator* allocator,
wasm_reserve_uint32s(allocator, &ctx->target_depths,
INITIAL_BR_TABLE_TARGET_CAPACITY);
- CALLBACK0(begin_module);
-
uint32_t magic;
in_u32(ctx, &magic, "magic");
RAISE_ERROR_UNLESS(magic == WASM_BINARY_MAGIC, "bad magic value");
@@ -1717,6 +1715,8 @@ WasmResult wasm_read_binary(WasmAllocator* allocator,
"bad wasm file version: %#x (expected %#x)", version,
WASM_BINARY_VERSION);
+ CALLBACK(begin_module, version);
+
/* type */
uint32_t section_size;
if (skip_until_section(ctx, WASM_BINARY_SECTION_TYPE, &section_size)) {