[babl] babl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0
- Date: Sun, 24 Sep 2017 21:50:50 +0000 (UTC)
commit 1434937088f68ce24eb4b3008108019243d3a2bc
Author: Ell <ell_se yahoo com>
Date: Sun Sep 24 17:46:50 2017 -0400
babl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0
Now that the previous commit (hopefully) makes us iPhone-proof, we
can add an assertion for this condition. If we want to replace the
assertions with some sort of bailing, we'll need to replace the rest
of them too anyway.
babl/babl-polynomial.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-polynomial.c b/babl/babl-polynomial.c
index c9f195b..82f9ce4 100644
--- a/babl/babl-polynomial.c
+++ b/babl/babl-polynomial.c
@@ -516,6 +516,7 @@ babl_polynomial_approximate_gamma (BablPolynomial *poly,
babl_assert (poly != NULL);
babl_assert (gamma >= 0.0);
+ babl_assert (x0 >= 0.0);
babl_assert (x0 < x1);
babl_assert (degree >= BABL_POLYNOMIAL_MIN_DEGREE &&
degree <= BABL_POLYNOMIAL_MAX_DEGREE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]