icemulti: Check for negative alignment exponent

This commit is contained in:
Roland Lutz 2017-07-11 17:32:14 +02:00
parent 395b36f293
commit a9c53a32c0
1 changed files with 2 additions and 0 deletions

View File

@ -241,6 +241,8 @@ int main(int argc, char **argv)
align_bits = strtol(optarg, &endptr, 0);
if (*endptr != '\0')
error("`%s' is not a valid number\n", optarg);
if (align_bits < 0)
error("argument to `-%c' must be non-negative\n", c);
break;
case 'o':
outfile_name = optarg;