Skip to content

Commit

Permalink
fixed CID 434949
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Jan 16, 2024
1 parent c3bb319 commit e74f100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/capture_filter/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ parse_fmt(char *cfg, struct resize_param *param)
if (strchr(item, 'x')) {
param->mode = USE_DIMENSIONS;
param->target_width = strtol(item, NULL, 10);
errno = 0;
param->target_height = strtol(strchr(item, 'x') + 1, NULL, 10);
} else {
param->mode = USE_FRACTION;
param->factor = strtod(item, NULL);
if (strchr(item, '/')) {
param->factor /= strtol(strchr(item, '/') + 1, NULL, 10);
const long den = strtol(strchr(item, '/') + 1, NULL, 10);
param->factor = den <= 0 ? .0 : param->factor / den;
}
}
}
Expand Down

0 comments on commit e74f100

Please sign in to comment.