From: Brendan Hansen Date: Sat, 12 Sep 2020 18:36:46 +0000 (-0500) Subject: Fixed #20 X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=0d703bdc3a2813e6987ecc6d7cbad21dfc9b42d7;p=onyx.git Fixed #20 --- diff --git a/onyx b/onyx index 699262fd..f33dd0bb 100755 Binary files a/onyx and b/onyx differ diff --git a/progs/particle_sym.onyx b/progs/particle_sym.onyx index c694db38..87ca48f1 100644 --- a/progs/particle_sym.onyx +++ b/progs/particle_sym.onyx @@ -34,7 +34,7 @@ init_positions :: proc () { } init_velocities :: proc () { - for ^v: velocities do *v = f32x4_const(0.0f, 0.0f, 0.0f, 0.0f); + for ^v: velocities do *v = f32x4_splat(0.0f); } horizontal_add :: proc (f: f32x4) -> f32 { diff --git a/src/onyxchecker.c b/src/onyxchecker.c index 98cf5d9a..3a984c70 100644 --- a/src/onyxchecker.c +++ b/src/onyxchecker.c @@ -798,7 +798,7 @@ b32 check_struct_literal(AstStructLiteral* sl) { if (!types_are_compatible(formal, (*actual)->type)) { onyx_report_error(sl->token->pos, "Mismatched types for %d%s member, expected '%s', got '%s'.", - i, bh_num_suffix(i), + i + 1, bh_num_suffix(i + 1), type_get_name(formal), type_get_name((*actual)->type)); return 1; diff --git a/src/onyxwasm.c b/src/onyxwasm.c index f5286ec6..7a691dfa 100644 --- a/src/onyxwasm.c +++ b/src/onyxwasm.c @@ -3007,7 +3007,8 @@ void onyx_wasm_module_compile(OnyxWasmModule* module, ProgramInfo* program) { } void onyx_wasm_module_free(OnyxWasmModule* module) { - bh_arena_free(module->extended_instr_data); + if (module->extended_instr_data != NULL) + bh_arena_free(module->extended_instr_data); bh_arr_free(module->types); bh_arr_free(module->funcs);