From: Brendan Hansen Date: Fri, 18 Sep 2020 17:03:10 +0000 (-0500) Subject: bugfixes with structs by value X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=931150d9525eed1a07a5cb496395b39b3a9dc3a9;p=onyx.git bugfixes with structs by value --- diff --git a/onyx b/onyx index f93ebfa0..c41cd073 100755 Binary files a/onyx and b/onyx differ diff --git a/src/onyxwasm.c b/src/onyxwasm.c index f3cdc524..df11a30f 100644 --- a/src/onyxwasm.c +++ b/src/onyxwasm.c @@ -922,7 +922,7 @@ EMIT_FUNC(for_array, AstFor* for_node, u64 iter_local) { WI(WI_BLOCK_END); WIL(WI_LOCAL_GET, ptr_local); - if (elem_size != 1) { + if (elem_size != 0) { WIL(WI_I32_CONST, elem_size); WI(WI_I32_ADD); } @@ -1020,7 +1020,7 @@ EMIT_FUNC(for_slice, AstFor* for_node, u64 iter_local) { WI(WI_BLOCK_END); WIL(WI_LOCAL_GET, ptr_local); - if (elem_size != 1) { + if (elem_size != 0) { WIL(WI_I32_CONST, elem_size); WI(WI_I32_ADD); }