Skip to content

workshop: fix #353 Voronoi operation crashes if Seed Edges is set

Jacob Boerema requested to merge wip/wormnest/voronoi-fix into master

In commit d4e80db6 bpp was changed from signed to unsigned int. This causes incorrect computation of pointer offsets due to mixing of signed and unsigned variables, which in turn causes a crash if parameter seed edges is enabled.

Let's revert this back to unsigned values, which is less invasive than explicitly casting to int everywhere it's needed. The value of bpp will be positive everywhere, so this should not have any negative effects in other places.

While we're at it, also silence an uninitialized warning by setting y0 to 0.

Merge request reports