mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-16 22:40:53 +08:00
m_option: also clamp OPT_FLOAT values for float_set
This incorrectly used clamp_double function after0e7f9c39dcwhen it should've always used clamp_float instead. Use clamp_float instead Fixes:0e7f9c39dc("m_option: correctly clamp OPT_FLOAT values")
This commit is contained in:
+1
-1
@@ -1209,7 +1209,7 @@ static int float_set(const m_option_t *opt, void *dst, struct mpv_node *src)
|
||||
{
|
||||
double tmp;
|
||||
int r = double_set(opt, &tmp, src);
|
||||
if (r >= 0 && clamp_double(opt, &tmp) < 0)
|
||||
if (r >= 0 && clamp_float(opt, &tmp) < 0)
|
||||
return M_OPT_OUT_OF_RANGE;
|
||||
if (r >= 0)
|
||||
VAL(dst) = tmp;
|
||||
|
||||
Reference in New Issue
Block a user