trianglify
trianglify copied to clipboard
sanity check on cell_size
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.
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.
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.