Clearly check min 1 source files.

This commit is contained in:
Christoffer Lerno
2021-04-29 20:23:10 +02:00
parent 0f6f376340
commit cd4b0bd803

View File

@@ -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++)
{