Fix bug in original insertion sort code.
authorWilhansen Li <wil@byimplication.com>
Fri, 30 Dec 2016 04:25:34 +0000 (12:25 +0800)
committerWilhansen Li <wil@byimplication.com>
Fri, 30 Dec 2016 04:25:34 +0000 (12:25 +0800)
dtbTool.c

index 680019b244593d9f8d6cd3db3b5da759fb9f839e..385a03e1a1def8aaa2134a333c4ff44c7302a5ad 100644 (file)
--- a/dtbTool.c
+++ b/dtbTool.c
@@ -204,6 +204,7 @@ int chip_add(struct chipInfo_t *c)
             } else {
                 c->next = x;
                 c->prev = x->prev;
+                x->prev->next = c;
                 x->prev = c;
                 break;
             }