diff --git a/src/mod/applications/mod_expr/exprilfs.h b/src/mod/applications/mod_expr/exprilfs.h index ad2b5515e0..7efc281c16 100644 --- a/src/mod/applications/mod_expr/exprilfs.h +++ b/src/mod/applications/mod_expr/exprilfs.h @@ -763,7 +763,7 @@ case EXPR_NODEFUNC_CLAMP: err = exprEvalNode(obj, nodes->data.function.nodes, 1, &d1); if (!err) - err = exprEvalNode(obj, nodes->data.function.nodes, 1, &d2); + err = exprEvalNode(obj, nodes->data.function.nodes, 2, &d2); if (!err) { EXPR_RESET_ERR(); @@ -771,7 +771,7 @@ case EXPR_NODEFUNC_CLAMP: EXPR_CHECK_ERR(); if (tmp < 0.0) - *val = tmp * d2; + *val = tmp + d2; else *val = tmp + d1; } else