diff --git a/cjpeg.c b/cjpeg.c index cf0e12d5..c23036d7 100644 --- a/cjpeg.c +++ b/cjpeg.c @@ -456,7 +456,7 @@ parse_switches(j_compress_ptr cinfo, int argc, char **argv, usage(); cinfo->data_precision = val; - } else if (keymatch(arg, "progressive", 3)) { + } else if (keymatch(arg, "progressive", 1)) { /* Select simple progressive mode. */ #ifdef C_PROGRESSIVE_SUPPORTED simple_progressive = TRUE; @@ -526,7 +526,7 @@ parse_switches(j_compress_ptr cinfo, int argc, char **argv, * default sampling factors. */ - } else if (keymatch(arg, "scans", 4)) { + } else if (keymatch(arg, "scans", 2)) { /* Set scan script. */ #ifdef C_MULTISCAN_FILES_SUPPORTED if (++argn >= argc) /* advance to next argument */ diff --git a/djpeg.c b/djpeg.c index fde2b8e4..80d79f02 100644 --- a/djpeg.c +++ b/djpeg.c @@ -392,7 +392,7 @@ parse_switches(j_decompress_ptr cinfo, int argc, char **argv, } else if (keymatch(arg, "report", 2)) { report = TRUE; - } else if (keymatch(arg, "scale", 2)) { + } else if (keymatch(arg, "scale", 1)) { /* Scale the output image by a fraction M/N. */ if (++argn >= argc) /* advance to next argument */ usage(); diff --git a/jpegtran.c b/jpegtran.c index 407cc438..b7d7ebbe 100644 --- a/jpegtran.c +++ b/jpegtran.c @@ -183,7 +183,7 @@ parse_switches(j_compress_ptr cinfo, int argc, char **argv, exit(EXIT_FAILURE); #endif - } else if (keymatch(arg, "copy", 2)) { + } else if (keymatch(arg, "copy", 1)) { /* Select which extra markers to copy. */ if (++argn >= argc) /* advance to next argument */ usage(); @@ -320,7 +320,7 @@ parse_switches(j_compress_ptr cinfo, int argc, char **argv, * handle. */ transformoption.perfect = TRUE; - } else if (keymatch(arg, "progressive", 2)) { + } else if (keymatch(arg, "progressive", 1)) { /* Select simple progressive mode. */ #ifdef C_PROGRESSIVE_SUPPORTED simple_progressive = TRUE;