Commit 7994bb7
committed
Handle corner cases of lengths in Generator.book
In particular, if minlength is given in the template and maxlength is
taken from the limit file, maxlength may be less than minlength. In that
case we now make maxlength equal to minlength.
Also, the argument of IntN must be maxlength-minlength+1 so that
maxlength is actually a value that might be generated. This will also
handle the case of maxlength == minlength correctly and without a panic.1 parent 95b5f03 commit 7994bb7
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
610 | 613 | | |
611 | | - | |
| 614 | + | |
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
| |||
0 commit comments