mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 10:17:31 +00:00
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).
This commit is contained in:
parent
a192f32a3a
commit
2bc871b577
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user