Fix -list option in test_spir (#2509)

This handles the case where test_spir is called without arguments.
This commit is contained in:
Harald van Dijk
2025-09-02 17:23:50 +01:00
committed by GitHub
parent 8a2b91c715
commit d0b0bd9570

View File

@@ -6782,7 +6782,8 @@ static int ParseCommandLine (int argc, const char *argv[],
ListTests();
return 0;
}
else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-list"))
else if ((argc > 1)
&& (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-list")))
{
ListTests();
return 0;