Display error message for invalid argument

If the game can't be initialized with the given command line argument,
display an error message and exit.
This commit is contained in:
Nunuhara Cabbage
2022-03-27 13:55:07 -07:00
parent bae291bcc9
commit c12ecef566
+3
View File
@@ -478,6 +478,9 @@ int main(int argc, char *argv[])
config_init_with_ini(argv[0]);
} else if (!strcasecmp(file_extension(argv[0]), "ain")) {
config_init_with_ain(argv[0]);
} else {
usage();
ERROR("Can't initialize game with argument '%s'", argv[0]);
}
ainfile = gamedir_path(config.ain_filename);