git » frei0r-plugins.git » main » tree

[main] / get_param_bool_fix.patch

diff --git a/include/frei0r.hpp b/include/frei0r.hpp
index 5eed2dc..ef12be4 100644
--- a/include/frei0r.hpp
+++ b/include/frei0r.hpp
@@ -101,7 +101,7 @@ namespace frei0r
 	{
 	case F0R_PARAM_BOOL :
 	  *static_cast<f0r_param_bool*>(param)
-	    = *static_cast<f0r_param_bool*>(ptr) > 0.5 ? 1.0 : 0.0;
+	    = *static_cast<bool*>(ptr) ? 1.0 : 0.0;
 	  break;
 	case F0R_PARAM_DOUBLE:
 	  *static_cast<f0r_param_double*>(param)