[util] Fix crash when --output-file is specified but not --output-format
This commit is contained in:
parent
d5f0d7c9fb
commit
e97835ad43
|
@ -401,7 +401,10 @@ struct output_options_t : option_group_t
|
||||||
if (output_file && !output_format) {
|
if (output_file && !output_format) {
|
||||||
output_format = strrchr (output_file, '.');
|
output_format = strrchr (output_file, '.');
|
||||||
if (output_format)
|
if (output_format)
|
||||||
|
{
|
||||||
output_format++; /* skip the dot */
|
output_format++; /* skip the dot */
|
||||||
|
output_format = strdup (output_format);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (output_file && 0 == strcmp (output_file, "-"))
|
if (output_file && 0 == strcmp (output_file, "-"))
|
||||||
|
|
Loading…
Reference in New Issue