[recipes] recipe-store: Fix re-adding ingredients



commit b9e21e0af8837dba66822415a85d2f38bfbd288a
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sun May 7 09:43:08 2017 +0530

    recipe-store: Fix re-adding ingredients
    
    The wrong variable was used to compare the ingredient name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782281

 src/gr-recipe-store.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-recipe-store.c b/src/gr-recipe-store.c
index cc35d70..118c484 100644
--- a/src/gr-recipe-store.c
+++ b/src/gr-recipe-store.c
@@ -1668,11 +1668,11 @@ strv_remove (char       ***strv_in,
         strv = g_new (char *, length + 1);
 
         for (i = 0, j = 0; i < length; i++) {
-                if (strcmp (strv[i], s) == 0) {
-                        g_free (strv[i]);
+                if (strcmp ((*strv_in)[i], s) == 0) {
+                        g_free ((*strv_in)[i]);
                         continue;
                 }
-                strv[j++] = strv[i];
+                strv[j++] = (*strv_in)[i];
         }
         strv[j] = NULL;
 


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