Skip to content

Commit

Permalink
Exit when argument parsing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bvschaik committed Dec 9, 2024
1 parent 336e982 commit 63d7657
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/platform/julius.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,12 @@ static void setup(const julius_args *args)
int main(int argc, char **argv)
{
julius_args args;
platform_parse_arguments(argc, argv, &args);
if (!platform_parse_arguments(argc, argv, &args)) {
#if !defined(_WIN32) && !defined(__vita__) && !defined(__SWITCH__) && !defined(__ANDROID__) && !defined(__APPLE__)
// Only exit on Linux platforms where we know the system will not throw any weird arguments our way
exit_with_status(1);
#endif
}

setup(&args);

Expand Down

0 comments on commit 63d7657

Please sign in to comment.