]> www.vanbest.org Git - sasc-ng.git/commitdiff
added jwc's list item count patch
authorleslie <unknown>
Sun, 26 Sep 2010 09:30:16 +0000 (11:30 +0200)
committerleslie <unknown>
Sun, 26 Sep 2010 09:30:16 +0000 (11:30 +0200)
misc.c

diff --git a/misc.c b/misc.c
index eb41c6b0d1595123701224587cbfd558d360d19f..6d616fc9f731c9773da8d6343801a0031a8e536c 100644 (file)
--- 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;
 }