[epiphany] gsb-storage: Fix bad bind indices



commit df1c957dcf10c8a70aefa32c738b960b5386eaa2
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Sun Nov 19 20:28:01 2017 +0200

    gsb-storage: Fix bad bind indices

 lib/safe-browsing/ephy-gsb-storage.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/lib/safe-browsing/ephy-gsb-storage.c b/lib/safe-browsing/ephy-gsb-storage.c
index aec72db..374d98d 100644
--- a/lib/safe-browsing/ephy-gsb-storage.c
+++ b/lib/safe-browsing/ephy-gsb-storage.c
@@ -783,6 +783,7 @@ ephy_gsb_storage_update_client_state (EphyGSBStorage    *self,
   EphySQLiteStatement *statement;
   GError *error = NULL;
   const char *sql;
+  gboolean success;
 
   g_assert (EPHY_IS_GSB_STORAGE (self));
   g_assert (self->is_operable);
@@ -803,7 +804,12 @@ ephy_gsb_storage_update_client_state (EphyGSBStorage    *self,
     return;
   }
 
-  if (!bind_threat_list_params (statement, list, 1, 2, 3, clear ? -1 : 0)) {
+  if (clear)
+    success = bind_threat_list_params (statement, list, 0, 1, 2, -1);
+  else
+    success = bind_threat_list_params (statement, list, 1, 2, 3, 0);
+
+  if (!success) {
     g_object_unref (statement);
     return;
   }


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