[trunk] fixed bug related to r2791
[openjpeg.git] / src / bin / jp3d / opj_jp3d_compress.c
index 066de3505645e6f32b816d54d553a78b0ea12653..b774e1496bb0585ba430e817d5e57f516f550d7a 100755 (executable)
@@ -488,7 +488,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters)
                        \r
                        case 's':                       /* subsampling factor */\r
                        {\r
-                               if (sscanf(opj_optarg, "%d,%d,%d", &parameters->subsampling_dx, &parameters->subsampling_dy, &parameters->subsampling_dz) != 2) {\r
+                               if (sscanf(opj_optarg, "%d,%d,%d", &parameters->subsampling_dx, &parameters->subsampling_dy, &parameters->subsampling_dz) != 3) {\r
                                        fprintf(stdout, "[ERROR] '-s' sub-sampling argument error !  [-s dx,dy,dz]\n");\r
                                        return 1;\r
                                }\r