Skip to content

Commit

Permalink
do not accept 0 expected digits
Browse files Browse the repository at this point in the history
This did not work before, and it was not intended to change
this.

I do not know of a use case where one is expecting no digits
at all, but is using ssocr to recognize the non-existing
digits.  If you do have such a use case, let me know.
  • Loading branch information
auerswal committed May 1, 2023
1 parent 898f5ec commit cf2391f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssocr.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ static int parse_interval(const char *s, interval_struct *i) {
i->min = i->max = min;
return 0;
}
if (min < 0) {
fputs(PROG": error: lower interval bound cannot be less than -1\n", stderr);
if (min < 1) {
fputs(PROG ": error: lower interval bound cannot be less than 1\n", stderr);
return 1;
}
upper = strchr(s, '-');
Expand Down

0 comments on commit cf2391f

Please sign in to comment.