From 40892a7415bb02c5463fe56dc79ad44724c770e9 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 11 Feb 2020 03:40:13 -0500 Subject: [PATCH] Fix completeReplace iteration --- complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/complete.c b/complete.c index 2f5275f..041aade 100644 --- a/complete.c +++ b/complete.c @@ -124,7 +124,7 @@ size_t completeID(const char *str) { void completeReplace(size_t id, const char *old, const char *new) { struct Node *next = NULL; - for (struct Node *node = head; node; node = node->next) { + for (struct Node *node = head; node; node = next) { next = node->next; if (id && node->id != id) continue; if (strcmp(node->str, old)) continue;