m_option: also clamp OPT_FLOAT values for float_set

This incorrectly used clamp_double function after 0e7f9c39dc when 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:
llyyr
2026-02-21 22:17:49 +05:30
committed by Kacper Michajłow
parent ae119448b2
commit e09a1d12f2
+1 -1
View File
@@ -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;