]> Pileus Git - wmpus/commitdiff
Fix list_insert
authorAndy Spencer <andy753421@gmail.com>
Sat, 17 Sep 2011 21:34:57 +0000 (21:34 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 17 Sep 2011 21:34:57 +0000 (21:34 +0000)
Thanks to Mike Auchter

util.c

diff --git a/util.c b/util.c
index c5f3b9af021c3351488198be26a5ccbbee8bde20..bf07b0283576cfc2a373609946c9120b18e1b4e5 100644 (file)
--- a/util.c
+++ b/util.c
@@ -11,7 +11,7 @@ list_t *list_insert(list_t *next, void *data)
        node->next = next;
        node->prev = next ? next->prev : NULL;
        if (node->next) node->next->prev = node;
-       if (node->prev) node->next->next = node;
+       if (node->prev) node->prev->next = node;
        return node;
 }