From cd4b0bd8039b619fdec0ec66cace08dbe5b76812 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 29 Apr 2021 20:23:10 +0200 Subject: [PATCH] Clearly check min 1 source files. --- src/compiler/compiler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/compiler.c b/src/compiler/compiler.c index dda5b1853..9b22f573a 100644 --- a/src/compiler/compiler.c +++ b/src/compiler/compiler.c @@ -103,6 +103,10 @@ void compiler_compile(BuildTarget *target) parse_file(context); } unsigned source_count = vec_size(contexts); + if (!source_count) + { + error_exit("No source files to compile."); + } assert(contexts); for (unsigned i = 0; i < source_count; i++) {