[trunk] Fix sscanf format specifier (fixes issue 494)
Thanks Aaron.
This commit is contained in:
parent
e3291c4e1f
commit
73881d0e52
|
@ -699,7 +699,7 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param
|
|||
OPJ_UINT32 numlayers = 0, numresolution = 0, matrix_width = 0;
|
||||
|
||||
char *s = opj_optarg;
|
||||
sscanf(s, "%ud", &numlayers);
|
||||
sscanf(s, "%u", &numlayers);
|
||||
s++;
|
||||
if (numlayers > 9)
|
||||
s++;
|
||||
|
@ -871,7 +871,7 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param
|
|||
char *s = opj_optarg;
|
||||
POC = parameters->POC;
|
||||
|
||||
while (sscanf(s, "T%ud=%ud,%ud,%ud,%ud,%ud,%4s", &POC[numpocs].tile,
|
||||
while (sscanf(s, "T%u=%u,%u,%u,%u,%u,%4s", &POC[numpocs].tile,
|
||||
&POC[numpocs].resno0, &POC[numpocs].compno0,
|
||||
&POC[numpocs].layno1, &POC[numpocs].resno1,
|
||||
&POC[numpocs].compno1, POC[numpocs].progorder) == 7) {
|
||||
|
|
|
@ -629,7 +629,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
|
|||
|
||||
case 'r': /* reduce option */
|
||||
{
|
||||
sscanf(opj_optarg, "%ud", &(parameters->core.cp_reduce));
|
||||
sscanf(opj_optarg, "%u", &(parameters->core.cp_reduce));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -638,7 +638,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
|
|||
|
||||
case 'l': /* layering option */
|
||||
{
|
||||
sscanf(opj_optarg, "%ud", &(parameters->core.cp_layer));
|
||||
sscanf(opj_optarg, "%u", &(parameters->core.cp_layer));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -678,7 +678,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
|
|||
|
||||
case 't': /* Input tile index */
|
||||
{
|
||||
sscanf(opj_optarg, "%ud", ¶meters->tile_index);
|
||||
sscanf(opj_optarg, "%u", ¶meters->tile_index);
|
||||
parameters->nb_tile_to_decode = 1;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue