diff options
| author | fleandro <3987005+flga@users.noreply.github.com> | 2024-12-23 01:03:51 +0000 |
|---|---|---|
| committer | fleandro <3987005+flga@users.noreply.github.com> | 2024-12-23 01:03:51 +0000 |
| commit | 6ff81b6e4c1f9880d92ee5a2ccae241431afb6ee (patch) | |
| tree | e7c9e16342879c98abad75746ee271a3e7a8b9d8 /src/main.cpp | |
| parent | 597fba7c31f5e927b0c7431444dad132352b4046 (diff) | |
make -export-dependencies:json emit valid json
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4d85a9e72..0450c61ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2120,7 +2120,7 @@ gb_internal void export_dependencies(Checker *c) { for_array(i, files) { AstFile *file = files[i]; gb_fprintf(&f, "\t\t\"%.*s\"", LIT(file->fullpath)); - if (i+1 == files.count) { + if (i+1 < files.count) { gb_fprintf(&f, ","); } gb_fprintf(&f, "\n"); @@ -2133,7 +2133,7 @@ gb_internal void export_dependencies(Checker *c) { for_array(i, load_files) { LoadFileCache *cache = load_files[i]; gb_fprintf(&f, "\t\t\"%.*s\"", LIT(cache->path)); - if (i+1 == load_files.count) { + if (i+1 < load_files.count) { gb_fprintf(&f, ","); } gb_fprintf(&f, "\n"); |