summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-01 17:23:56 +0200
committerwm4 <wm4@nowhere>2014-06-01 17:23:56 +0200
commit2bc871b577c13cc74568898fecda9d87efe1ac19 (patch)
treea9d43aaf574ab3712309a14e06e544bc3627d929 /options
parenta192f32a3a6f6c3c66542f48b512f3892dbed838 (diff)
downloadmpv-2bc871b577c13cc74568898fecda9d87efe1ac19.tar.bz2
mpv-2bc871b577c13cc74568898fecda9d87efe1ac19.tar.xz
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).
Diffstat (limited to 'options')
-rw-r--r--options/m_option.c2
1 files changed, 1 insertions, 1 deletions
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;
}