From 241a7295ba22b4b12b67fe72538d8ee5b4b8275b Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Sat, 1 Mar 2008 16:16:12 +0100 Subject: [PATCH] Ticket #127 also affects iso_dir_iter_take(). Fixed. --- libisofs/libisofs.h | 2 +- libisofs/node.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index 2531f35..c39b6d7 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -2062,7 +2062,7 @@ IsoDir *iso_node_get_parent(IsoNode *node); * you should free the iterator with iso_dir_iter_free. * You musn't delete a child of the same dir, using iso_node_take() or * iso_node_remove(), while you're using the iterator. You can use - * iso_node_take_iter() or iso_node_remove_iter() instead. + * iso_dir_iter_take() or iso_dir_iter_remove() instead. * * You can use the iterator in the way like this * diff --git a/libisofs/node.c b/libisofs/node.c index 45eafbb..96993ba 100644 --- a/libisofs/node.c +++ b/libisofs/node.c @@ -503,7 +503,7 @@ int iso_dir_iter_take(IsoDirIter *iter) if (iter->pos == pos) { return ISO_ERROR; } - while (pos != NULL && pos->next == iter->pos) { + while (pos != NULL && pos->next != iter->pos) { pos = pos->next; } if (pos == NULL) {