From 5c27fb2b27936387212de5a7d5736bc98cb6d42a Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Sun, 17 Mar 2024 15:00:59 -0400 Subject: [PATCH] fixing --- include/sl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/sl.h b/include/sl.h index d8c7104..88ad7f0 100644 --- a/include/sl.h +++ b/include/sl.h @@ -280,7 +280,12 @@ struct sl_trace { __path[__i]->field.sle_next[__i] = (listelm); \ } \ (listelm)->field.sle_prev = __elm; \ - __elm->field.sle_next[0]->field.sle_prev = (listelm); \ + if ((listelm)->field.sle_prev == (struct type *)(head)->slh_head) { \ + (head)->slh_head[0] = (listelm); \ + } \ + if ((listelm)->field.sle_next[0] == (head)->slh_tail) { \ + (head)->slh_tail = (listelm); \ + } \ (head)->length++; \ ARRAY_FREE(__path); \ } while (0)