[vlc-commits] help: fix float lower bound check
Lyndon Brown
git at videolan.org
Sun Nov 15 19:22:24 CET 2020
vlc/vlc-3.0 | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Sun Mar 31 07:23:19 2019 +0200| [a289c98a9fffe2fc0c78fd7cdf25b95c522a64a8] | committer: David Fuhrmann
help: fix float lower bound check
needs to check -FLT_MAX not FLT_MIN, as explained in
c95d5fbea2122ac471f8aee86ee9f1cafeddeb00
that commit overlooked this and introduced a bug in 3.x whereby help output
would always print the range for float options with default ranges,
resulting in much messier output than expected.
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
(cherry picked from commit 95a9457b33220695b7891d12df70ad415ce17dec)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=a289c98a9fffe2fc0c78fd7cdf25b95c522a64a8
---
src/config/help.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config/help.c b/src/config/help.c
index 0f550cea79..4c7033341f 100644
--- a/src/config/help.c
+++ b/src/config/help.c
@@ -474,7 +474,7 @@ static void print_item(const vlc_object_t *p_this, const module_t *m, const modu
}
case CONFIG_ITEM_FLOAT:
type = _("float");
- if (item->min.f != FLT_MIN || item->max.f != FLT_MAX)
+ if (item->min.f != -FLT_MAX || item->max.f != FLT_MAX)
{
if (asprintf(&typebuf, "%s [%f .. %f]", type,
item->min.f, item->max.f) >= 0)
More information about the vlc-commits
mailing list