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 authored and Kacper Michajłow committed 2026-02-24 19:41:53 +01:00
1 parent ae119448b2
commit e09a1d12f2
1 file changed
+1 -1
+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;