qrohlf / trianglify

Algorithmically generated triangle art
http://qrohlf.com/trianglify/
GNU General Public License v3.0
10.08k stars 669 forks source link

sanity check on cell_size #35

Open qrohlf opened 9 years ago

qrohlf commented 9 years ago

The current sanity checks for cell_size are not sufficient, it is still possible to create an infinite loop by passing in a string (i.e. "40" instead of 40) for cell_size.

Oops.

qrohlf commented 8 years ago

This may also apply to width/height/etc. Bugfix will be to define some sane constraints for how large/small each value can be and then throw an exception if arguments are invalid or of the wrong type.

Saucistophe commented 6 years ago

I concur with the need for a global sanity check. I set a huge value for width, just to see what would happen, saw the memory increase quickly, then waived desperately as my OS slowly froze to death.