Hi,

can you please test the attached patch?

Hannes
diff --git a/utilities.c b/utilities.c
index 078bd29..f1427f1 100644
--- a/utilities.c
+++ b/utilities.c
@@ -193,7 +193,7 @@ process_line_arg(const Arg *arg) {
 
 gboolean
 changemapping(Key *search_key, int maprecord, char *cmd) {
-    KeyList *current, *newkey;
+    KeyList *current, *newkey, *prev = NULL;
     Arg a = { .s = cmd };
 
     /* sanity check */
@@ -225,6 +225,7 @@ changemapping(Key *search_key, int maprecord, char *cmd) {
             }
             return TRUE;
         }
+        prev = current;
         current = current->next;
     }
 
@@ -252,8 +253,8 @@ changemapping(Key *search_key, int maprecord, char *cmd) {
     if (client.config.keylistroot == NULL)
         client.config.keylistroot = newkey;
 
-    if (current != NULL)
-        current->next = newkey;
+    if (prev != NULL)
+        prev->next = newkey;
 
     return TRUE;
 }
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Vimprobable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vimprobable-users

Reply via email to