Skip to content

Commit

Permalink
Allow region width & height to be zero
Browse files Browse the repository at this point in the history
Enabled: select a region around a clicked point:

    ffcast -s pad 100
  • Loading branch information
ropery committed Oct 11, 2016
1 parent ef021d3 commit bcbad5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ffcast.bash
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ set_region_vars_by_offsets() {
debug '\t%s' "$(declare -p "$1")"
shift
done
if ! ((rect_w > 0 && rect_h > 0)); then
if ((rect_w < 0 || rect_h < 0)); then
error 'invalid region size: %sx%s' "$rect_w" "$rect_h"
return 1
fi
Expand Down

0 comments on commit bcbad5a

Please sign in to comment.