[chronojump] Fixed: https://gitlab.gnome.org/GNOME/chronojump/-/issues/620



commit ce12cae0dd320057e76a8f54b22ee1012e338555
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Dec 3 13:26:38 2021 +0100

    Fixed: https://gitlab.gnome.org/GNOME/chronojump/-/issues/620
    
    crash loading algometer data (on try to display a trigger that is outside of captured time

 src/forceSensor.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 4e0bfda06..4cadfb546 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -1003,7 +1003,9 @@ public class ForceSensorCapturePoints
                        if(times[i] > us)
                                return lastPos;
 
-                       lastPos ++;
+                       //increment lastPos, but never allow it to be outside of times.Count
+                       if(lastPos <= times.Count -2)
+                               lastPos ++;
                }
 
                return lastPos;


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