From 2bc871b577c13cc74568898fecda9d87efe1ac19 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 Jun 2014 17:23:56 +0200 Subject: m_option: use isfinite() instead of isnormal() This accidentally rejected d==0. We can actually deal with sub-normals fine, we just want to exclude nan and infinity (although infinity is already accounted for, but anyway). --- options/m_option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options') diff --git a/options/m_option.c b/options/m_option.c index 063a5a3495..f52a81a0b9 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1707,7 +1707,7 @@ static int parse_color(struct mp_log *log, const m_option_t *opt, for (int n = 0; n < num; n++) { bstr rest; double d = bstrtod(comp_str[n], &rest); - if (rest.len || !comp_str[n].len || d < 0 || d > 1 || !isnormal(d)) + if (rest.len || !comp_str[n].len || d < 0 || d > 1 || !isfinite(d)) goto error; comp[n] = d; } -- cgit v1.2.3