[chronojump] Fixed crash on delete set from encoder set load



commit b55988c0587730de4c5c7a38533f8e20bac82392
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jul 15 13:49:41 2021 +0200

    Fixed crash on delete set from encoder set load

 src/sqlite/encoder.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 37b5b639e..6d664449b 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -251,7 +251,11 @@ class SqliteEncoder : Sqlite
                        if(ecconSelect != EncoderSQL.Eccons.ALL)
                                selectStr += andString + Constants.EncoderTable + ".eccon = \"" + 
EncoderSQL.Eccons.ecS.ToString() + "\"";
                }
-                       
+
+               //ensure andString is defined if selectStr is != "" (bug on 2.1.2 release)
+               if(selectStr != "")
+                       andString = " AND ";
+
                string onlyActiveString = "";
                if(onlyActive)
                        onlyActiveString = andString + Constants.EncoderTable + ".status = \"active\" ";


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