Comment 18 for bug 1406458

Revision history for this message
Ryan Richards (ryan-richards) wrote :

I don't know C++, or the internals of Inkscape. I'm working with a JS port of the code in the SVG spec trying to fix this bug that's everywhere. I put it on GitHub ( https://github.com/Ani-Mayhem-Com/feTurbulence )
Putting

fGradient[k][i][0] = (fGradient[k][i][0] / s ? fGradient[k][i][0] / s : 0);
fGradient[k][i][1] = (fGradient[k][i][1] / s ? fGradient[k][i][1] / s : 0);

after the failed zero devision instead of feeding a pair of 1's before. This puts the pair of zeros into the array. If this actually works, I think that should be the solution as it restores the results of the random function.