main: validate arguments

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2023-07-07 13:54:44 +03:00
parent b211342d8a
commit 0aaf516358
1 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,10 @@
// Main code
int main(int argc, char* argv[])
{
if (argc == 1) {
printf("Usage: %s <module path>\n", argv[0]);
return -1;
}
logging::init(true);//init logging
const char* const path = argv[1]; //argument 1 is the path of self file to boot