cairo: prevent infinite loop in functionShadedFill()
Prevent y_step
or x_step
to be zero, as that would cause
infinite loop. Reproducible with the pdf file posted in
issue #1520 (closed)
Fixed by setting a minimum step to force upon x_step
and
y_step
, to avoid approximate or reach infinite loop when
x_step
or y_step
approximates to or equals zero. \
Thanks Wesley Moore for reporting and debugging.
I clamped the y_step
and x_step
to a minimun of subdivide_pixels
which is the constant used to calculate the steps, in my reading of the code that should be ok as a minimum step required.
Anyway @ajohnson would know better as he wrote that function in commit 47ffce08
Closes #1520 (closed)