cssimageradial: Avoid creating color stops with an offset > 1

This commit is contained in:
Timm Bäder 2020-09-19 08:55:18 +02:00
parent 1d371db8d8
commit 79dc25e0b1

View File

@ -176,7 +176,7 @@ gtk_css_image_radial_snapshot (GtkCssImage *image,
continue; continue;
} }
else else
pos = _gtk_css_number_value_get (stop->offset, hradius) / hradius; pos = MIN (1.0, _gtk_css_number_value_get (stop->offset, hradius) / hradius);
pos = MAX (pos, 0); pos = MAX (pos, 0);
step = (pos - offset) / (i - last); step = (pos - offset) / (i - last);