summaryrefslogtreecommitdiff
path: root/src/wasm-binary-writer.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-04-25 07:11:01 -0700
committerBen Smith <binji@chromium.org>2016-04-28 23:45:51 -0700
commit8ff085d37bb107cabe7e9305553f7c3179e4ded8 (patch)
tree2e8f8f1ec78689fb1594ca509a3bd0fb75c205e0 /src/wasm-binary-writer.c
parent8b8647dc8f4cc032d5ce932fd4df22ff3714086d (diff)
downloadwabt-8ff085d37bb107cabe7e9305553f7c3179e4ded8.tar.gz
wabt-8ff085d37bb107cabe7e9305553f7c3179e4ded8.tar.bz2
wabt-8ff085d37bb107cabe7e9305553f7c3179e4ded8.zip
move section length after section name
Diffstat (limited to 'src/wasm-binary-writer.c')
-rw-r--r--src/wasm-binary-writer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary-writer.c b/src/wasm-binary-writer.c
index 4a33a8a7..c2fbea89 100644
--- a/src/wasm-binary-writer.c
+++ b/src/wasm-binary-writer.c
@@ -250,11 +250,11 @@ static void begin_section(WasmContext* ctx,
char desc[100];
wasm_snprintf(desc, sizeof(desc), "section \"%s\"", name);
write_header(ctx, desc, PRINT_HEADER_NO_INDEX);
- ctx->last_section_offset =
- write_u32_leb128_space(ctx, leb_size_guess, "section size (guess)");
ctx->last_section_leb_size_guess = leb_size_guess;
wasm_snprintf(desc, sizeof(desc), "section id: \"%s\"", name);
write_str(&ctx->stream, name, strlen(name), WASM_DONT_PRINT_CHARS, desc);
+ ctx->last_section_offset =
+ write_u32_leb128_space(ctx, leb_size_guess, "section size (guess)");
}
static void end_section(WasmContext* ctx) {