From f66ad38f1c9f2456c28feaa63667599acc932096 Mon Sep 17 00:00:00 2001 From: leslie Date: Sun, 26 Sep 2010 11:30:16 +0200 Subject: [PATCH] added jwc's list item count patch --- misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index eb41c6b..6d616fc 100644 --- a/misc.c +++ b/misc.c @@ -264,6 +264,7 @@ void cSimpleListBase::Del(cSimpleItem *Item, bool Del) if(first==Item) { first=Item->next; if(!first) last=0; + count--; } else { cSimpleItem *item=first; @@ -271,12 +272,12 @@ void cSimpleListBase::Del(cSimpleItem *Item, bool Del) if(item->next==Item) { item->next=Item->next; if(!item->next) last=item; + count--; break; } item=item->next; } } - count--; if(Del) delete Item; } -- 2.39.5