robbmcleod / pyfastnoisesimd

Python module wrapping C++ FastNoiseSIMD
BSD 3-Clause "New" or "Revised" License
39 stars 6 forks source link

Fix alignment on non-optimized systems. #20

Closed QuLogic closed 5 years ago

QuLogic commented 5 years ago

PPC64LE, for example, does not have any optimized code, so alignment is 2, and dividing by item size (which is greater than 2), the result is 0. This produces a divide-by-zero later, so it should be limited to 1 at minimum.

robbmcleod commented 5 years ago

Good catch, thanks.