From: Brendan Hansen Date: Tue, 10 Jan 2023 15:01:55 +0000 (-0600) Subject: tiny bugfix, but crucial change X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=745c5efcdfb75dde6f4c350a983fd8892d1e561d;p=onyx.git tiny bugfix, but crucial change --- diff --git a/compiler/src/wasm_emit.c b/compiler/src/wasm_emit.c index e4aeab4d..e4cf230e 100644 --- a/compiler/src/wasm_emit.c +++ b/compiler/src/wasm_emit.c @@ -3469,9 +3469,8 @@ EMIT_FUNC(expression, AstTyped* expr) { emit_load_instruction(mod, &code, field->type, offset); } else if (onyx_type_is_stored_in_memory(field->expr->type)) { - u64 offset = 0; emit_expression(mod, &code, field->expr); - emit_load_instruction(mod, &code, field->type, offset); + emit_load_instruction(mod, &code, field->type, field->offset); } else { emit_expression(mod, &code, field->expr);