From 14d5e6bd927b97e39952fe773ade3ae43ba504c1 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Fri, 23 Jun 2023 09:34:54 -0500 Subject: [PATCH] bugfixes --- CHANGELOG | 16 ++++++++++++++++ core/encoding/json/encoder.onyx | 1 - scripts/onyx-pkg.onyx | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 383d84d9..beb0d792 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,19 @@ +Release v0.1.5 +----------- +Not released + +Additions: + +Removals: + +Changes: + +Bugfixes: +- Fixed bug in `json.encode` that caused arrays of structures to not be outputted correctly. +- Fixed bug in `onyx pkg` that caused `onyx pkg new` to not work as intended. + + + Release v0.1.4 ----------- 22nd June 2023 diff --git a/core/encoding/json/encoder.onyx b/core/encoding/json/encoder.onyx index c596fe1e..2182f227 100644 --- a/core/encoding/json/encoder.onyx +++ b/core/encoding/json/encoder.onyx @@ -182,7 +182,6 @@ encode :: (w: ^io.Writer, data: any) -> Encoding_Error { a := cast(^Type_Info_Dynamic_Array) info; arr := cast(^core.array.Untyped_Array) data.data; - data := arr.data; count := arr.count; for i: count { diff --git a/scripts/onyx-pkg.onyx b/scripts/onyx-pkg.onyx index b8a693dd..fcb101a9 100644 --- a/scripts/onyx-pkg.onyx +++ b/scripts/onyx-pkg.onyx @@ -503,7 +503,7 @@ run_new_command :: (args: [] cstr) { } template_dir := Template_Directory(); - template_file := tprintf("{}{}.json", template_dir, template_name); + template_file := os.path_join(template_dir, tprintf("{}.json", template_name)); if !os.file_exists(template_file) { error_print("Template '{}' not found in {}\n", template_name, template_dir); return; -- 2.25.1