From ab9c63852d53a6991ccbab6111645d949909ba04 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 17 May 2014 15:14:06 -0400 Subject: Don't allow a bit depth of 1. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index f4912de..7558f96 100644 --- a/main.c +++ b/main.c @@ -206,7 +206,7 @@ parse_options(options_t *options, int argc, char *argv[]) if (parse_arg(argc, argv, "-b", "--bit-depth", &value, &i, &error)) { if (!str_to_uint(value, &options->bit_depth) - || options->bit_depth <= 0 + || options->bit_depth <= 1 || options->bit_depth > 24) { fprintf(stderr, "Invalid bit depth: `%s'\n", value); error = true; -- cgit v1.2.3