From f16c10d94bcaadc329cd01aef20ab8176c834d06 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 3 Jun 2024 00:31:22 +0200 Subject: [PATCH] fixed not passing sdk check --- src/compiler.c | 2 +- src/io/files.c | 2 +- src/io/files.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index 79e9b20..69e4e02 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -110,7 +110,7 @@ static void print_ast_to_file(AST_NODE_PTR ast, TargetConfig *target) { return; // create file path to write graphviz to - const char *path = make_file_path(1, target->name, ".gv", target->archive_directory); + const char *path = make_file_path(target->name, ".gv", 1, target->archive_directory); FILE *output = fopen((const char *) path, "w"); if (output == NULL) { diff --git a/src/io/files.c b/src/io/files.c index 86cdfdb..0ea8993 100644 --- a/src/io/files.c +++ b/src/io/files.c @@ -326,7 +326,7 @@ const char *get_absolute_path(const char *path) { return strdup(absolute_path); } -const char* make_file_path(int count, const char* name, const char* ext, ...) { +const char* make_file_path(const char* name, const char* ext, int count, ...) { DEBUG("building file path..."); va_list args; diff --git a/src/io/files.h b/src/io/files.h index 7b8b166..61c7ebb 100644 --- a/src/io/files.h +++ b/src/io/files.h @@ -151,6 +151,6 @@ const char* get_absolute_path(const char* path); * @return A relative path of a file */ [[nodiscard("pointer must be freed")]] -const char* make_file_path(int count, const char* name, const char* ext, ...); +const char* make_file_path(const char* name, const char* ext, int count, ...); #endif //GEMSTONE_FILES_H