summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-09-19 08:55:18 +0200
committerTimm Bäder <mail@baedert.org>2020-09-19 08:55:18 +0200
commit79dc25e0b11466ad7a8058e780f8c1e729be2b72 (patch)
tree629aca16ec1ab8ee456d274471ecb7dffb7faf6f
parent1d371db8d8e96d87a54c6d45f99c255a8e4a3061 (diff)
downloadgtk+-79dc25e0b11466ad7a8058e780f8c1e729be2b72.tar.gz
cssimageradial: Avoid creating color stops with an offset > 1
-rw-r--r--gtk/gtkcssimageradial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c
index 6d7980dc1a..4b36a1e165 100644
--- a/gtk/gtkcssimageradial.c
+++ b/gtk/gtkcssimageradial.c
@@ -176,7 +176,7 @@ gtk_css_image_radial_snapshot (GtkCssImage *image,
continue;
}
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);
step = (pos - offset) / (i - last);