enhance scale-hsla validation - refs #1954

This commit is contained in:
Dane Springmeyer 2013-07-24 20:25:07 -04:00
parent ec950bd983
commit 88d42c48a9

View file

@ -71,10 +71,14 @@ struct scale_hsla
l1(_l1),
a0(_a0),
a1(_a1) {
if (h0 < 0 || h1 > 1 ||
s0 < 0 || s1 > 1 ||
l0 < 0 || l1 > 1 ||
a0 < 0 || a1 > 1)
if (h0 < 0 || h0 > 1 ||
h1 < 0 || h1 > 1 ||
s0 < 0 || s0 > 1 ||
s1 < 0 || s1 > 1 ||
l0 < 0 || l0 > 1 ||
l1 < 0 || l1 > 1 ||
a0 < 0 || a0 > 1 ||
a1 < 0 || a1 > 1)
{
throw config_error("scale-hsla values must be between 0 and 1");
}