Fix exit code of --help and --version, and test them in CI

Corrects prior regression which caused ERROR output and exit code of 1.
This commit is contained in:
Jan Haller
2022-07-02 01:05:20 +02:00
parent a2459c7d35
commit d38d76d039
9 changed files with 24 additions and 4 deletions

View File

@ -166,6 +166,10 @@ int widechar_main(int argc, wchar_t **argv) {
delete[] argv_utf8[i];
}
delete[] argv_utf8;
if (err == ERR_HELP) { // Returned by --help and --version, so success.
return 0;
}
return 255;
}