summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-17 15:14:06 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-17 15:14:06 -0400
commitab9c63852d53a6991ccbab6111645d949909ba04 (patch)
treed33b980481e0f12a08d019b9ed0251cfe89635b8
parent914c9ebd7c401edc3e56bd5834e4a6c16ab3cda6 (diff)
downloadkd-forest-ab9c63852d53a6991ccbab6111645d949909ba04.tar.xz
Don't allow a bit depth of 1.
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
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;