nus-cs2113-AY2324S2 / pe-dev-response

0 stars 0 forks source link

`gen` feature allows 0 for `MAXIMUM_DIGITS` #2497

Open nus-pe-bot opened 7 months ago

nus-pe-bot commented 7 months ago

image.png

When given 0 for MAXIMUM_DIGITS field, it generates all zeroes. This behaviour shouldn't exist as there should be no numbers with 0 maximum digits.

Perhaps there should be checks to verify if it is 0?


[original: nus-cs2113-AY2324S2/pe-interim#2443] [original labels: severity.Low type.FunctionalityBug]

classskipper351 commented 7 months ago

Team's Response

It's true that when I wrote the boundary condition check, I only thought about excluding those cases that would crash the system, and didn't consider the case where the operand was all 0, thanks for mentioning it :D

Duplicate status (if any):

Duplicate of #2288