[chronojump] Fixed crash on inserting new run intervalType with distance as float (on latin languages)



commit 0f3b63f346a0a6654a701e05e7ca362c1fd0049f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 25 21:07:16 2016 +0200

    Fixed crash on inserting new run intervalType with distance as float (on latin languages)

 src/sqlite/runType.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/sqlite/runType.cs b/src/sqlite/runType.cs
index 68bfef1..53a7984 100644
--- a/src/sqlite/runType.cs
+++ b/src/sqlite/runType.cs
@@ -444,7 +444,7 @@ class SqliteRunIntervalType : SqliteRunType
                mycmd.CommandText = "INSERT INTO " + tableName + 
                                " (uniqueID, name, distance, tracksLimited, fixedValue, unlimited, 
description, distancesString)" +
                                " VALUES (NULL, \"" +
-                               t.Name +        "\", " + t.Distance + ", " + Util.BoolToInt(t.TracksLimited) 
+  ", " + t.FixedValue + ", " +
+                               t.Name +        "\", " + Util.ConvertToPoint(t.Distance) + ", " + 
Util.BoolToInt(t.TracksLimited) +     ", " + t.FixedValue + ", " +
                                Util.BoolToInt(t.Unlimited) +   ", \"" + t.Description +        "\", \"" + 
t.DistancesString +  "\")" ; 
                LogB.SQL(mycmd.CommandText.ToString());
                mycmd.ExecuteNonQuery();


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