mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-02-13 02:44:21 +01:00
Deal with -L not being passed a parameter.
Some checks are pending
check_build / build (push) Waiting to run
Some checks are pending
check_build / build (push) Waiting to run
This commit is contained in:
parent
3f48188a45
commit
2885060409
2
main.c
2
main.c
|
|
@ -438,6 +438,8 @@ int main(int argc, char *argv[])
|
|||
license();
|
||||
exit(0);
|
||||
}
|
||||
if (!optarg)
|
||||
failure("No level specified with -L\n");
|
||||
control->compression_level = strtol(optarg, &endptr, 10);
|
||||
if (control->compression_level < 1 || control->compression_level > 9)
|
||||
failure("Invalid compression level (must be 1-9)\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue