[vlc-devel] [PATCH 2/2] macosx: fix float lower bound check

Lyndon Brown jnqnfe at gmail.com
Wed Sep 30 21:20:11 CEST 2020


preview:

From: Lyndon Brown <jnqnfe at gmail.com>
Date: Sun, 31 Mar 2019 07:34:10 +0100
Subject: macosx: fix float lower bound check

needs to check -FLT_MAX not FLT_MIN, as explained in
c95d5fbea2122ac471f8aee86ee9f1cafeddeb00

diff --git a/modules/gui/macosx/preferences/prefs_widgets.m b/modules/gui/macosx/preferences/prefs_widgets.m
index d256052579..07ed07854d 100644
--- a/modules/gui/macosx/preferences/prefs_widgets.m
+++ b/modules/gui/macosx/preferences/prefs_widgets.m
@@ -811,7 +811,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
                                                      withView: parentView];
             break;
         case CONFIG_ITEM_FLOAT:
-            if (_p_item->min.f > FLT_MIN && _p_item->max.f < FLT_MAX)
+            if (_p_item->min.f > -FLT_MAX && _p_item->max.f < FLT_MAX)
                 control = [[RangedFloatConfigControl alloc] initWithItem: _p_item withView: parentView];
             else
                 control = [[FloatConfigControl alloc] initWithItem: _p_item withView: parentView];



More information about the vlc-devel mailing list