From: leslie Date: Sun, 26 Sep 2010 09:30:16 +0000 (+0200) Subject: added jwc's list item count patch X-Git-Tag: upstream/620~65 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=f66ad38f1c9f2456c28feaa63667599acc932096;p=sasc-ng.git added jwc's list item count patch --- 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; }