[chronojump] Fixed crash on Convert.ToInt32 on very large stiffness values - TC is (or has been manipulated to be



commit 5689227837ffe692095672fde0789b48ba1cc206
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Oct 27 17:32:04 2021 +0200

    Fixed crash on Convert.ToInt32 on very large stiffness values - TC is (or has been manipulated to be) 
very very low but not 0

 src/treeview/jump.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/treeview/jump.cs b/src/treeview/jump.cs
index 26d52449e..bfa811067 100644
--- a/src/treeview/jump.cs
+++ b/src/treeview/jump.cs
@@ -226,8 +226,9 @@ public class TreeViewJumps : TreeViewEvent
                        } else
                                myData[count++] = "0";
                }
+
                if (preferences.showStiffness)
-                       myData[count++] = Convert.ToInt32(newJump.Stiffness(personWeight, 
weightInKg)).ToString();
+                       myData[count++] = newJump.Stiffness(personWeight, weightInKg).ToString();
                if (preferences.showInitialSpeed) 
                        myData[count++] = Util.TrimDecimals(Util.GetInitialSpeed(newJump.Tv.ToString(), 
preferences.metersSecondsPreferred), pDN);
                if (preferences.showJumpRSI)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]