Fix completeReplace iteration
parent
172cd57099
commit
40892a7415
|
@ -124,7 +124,7 @@ size_t completeID(const char *str) {
|
||||||
|
|
||||||
void completeReplace(size_t id, const char *old, const char *new) {
|
void completeReplace(size_t id, const char *old, const char *new) {
|
||||||
struct Node *next = NULL;
|
struct Node *next = NULL;
|
||||||
for (struct Node *node = head; node; node = node->next) {
|
for (struct Node *node = head; node; node = next) {
|
||||||
next = node->next;
|
next = node->next;
|
||||||
if (id && node->id != id) continue;
|
if (id && node->id != id) continue;
|
||||||
if (strcmp(node->str, old)) continue;
|
if (strcmp(node->str, old)) continue;
|
||||||
|
|
Loading…
Reference in New Issue