Fix completeReplace iteration

master
C. McEnroe 2020-02-11 03:40:13 -05:00
parent 172cd57099
commit 40892a7415
1 changed files with 1 additions and 1 deletions

View File

@ -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;