diff options
Diffstat (limited to 'tools/tiffmedian.c')
-rw-r--r-- | tools/tiffmedian.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c index 8225970c..334566a4 100644 --- a/tools/tiffmedian.c +++ b/tools/tiffmedian.c @@ -144,10 +144,15 @@ int main(int argc, char *argv[]) num_colors = atoi(optarg); if (num_colors > MAX_CMAP_SIZE) { - fprintf(stderr, "-c: colormap too big, max %d\n", + fprintf(stderr, "-C: colormap too big, max %d\n", MAX_CMAP_SIZE); usage(EXIT_FAILURE); } + if (num_colors < 2) + { + fprintf(stderr, "-C: colormap too small, min %d\n", 2); + usage(EXIT_FAILURE); + } break; case 'f': /* dither */ dither = 1; |