From 8761680d786597e962730f85e4039f699a8fd5c0 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 23 May 2022 21:17:38 +0200 Subject: [PATCH] wasm3: update argument order for host functions --- test/utils/wasm3_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/utils/wasm3_engine.cpp b/test/utils/wasm3_engine.cpp index 1cfb6eea8..53a6ed07c 100644 --- a/test/utils/wasm3_engine.cpp +++ b/test/utils/wasm3_engine.cpp @@ -42,8 +42,8 @@ namespace const void* env_adler32( IM3Runtime /*runtime*/, IM3ImportContext /*context*/, uint64_t* stack, void* mem) { - const uint32_t offset = static_cast(stack[0]); - const uint32_t length = static_cast(stack[1]); + const uint32_t offset = static_cast(stack[1]); + const uint32_t length = static_cast(stack[2]); stack[0] = fizzy::test::adler32({reinterpret_cast(mem) + offset, length}); return m3Err_none; }