[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kjs
From:       Maks Orlovich <maksim () kde ! org>
Date:       2010-05-10 22:57:02
Message-ID: 20100510230149.5EDF8AC8B2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1125198 by orlovich:

Fix a regression in copyTail of empty lists... I feel like a crasher 
teve showed me a bit back was likely causes by this.


 M  +4 -0      list.cpp  


--- trunk/KDE/kdelibs/kjs/list.cpp #1125197:1125198
@@ -280,6 +280,10 @@
     ListImp*     outImp = static_cast<ListImp *>(copy._impBase);
 
     int size      = inImp->size - 1;
+
+    if (size < 0)
+        size = 0; // copyTail on empty list.
+    
     outImp->size  = size;
 
     if (size > inlineListValuesSize) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic