Open HeeillWang opened 12 months ago
Hi @HeeillWang, thanks for reporting this!
Proper panic message should be added by
assert!
or need to use checked operations.
Could you either add an asset that forbids using a width of zero of add the checked arithmetic? I think it's okay to document that the width should be non-zero and just reject such input since it doesn't make sense.
It seems like the overflow occurs because size of column
is too big, not because width
is zero.
It seems like the overflow occurs because size of
column
is too big, not becausewidth
is zero.
Hey @HeeillWang, I haven't debugged this further — if you make a PR for this, then I would be very happy to include it.
I executed fuzzing with textwrap-0.16.0. Proper panic message should be added by
assert!
or need to use checked operations.reproduce with :