]> www.ginac.de Git - ginac.git/commitdiff
lst(0) now works as expected
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 13 Aug 2003 18:44:47 +0000 (18:44 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 13 Aug 2003 18:44:47 +0000 (18:44 +0000)
ginac/container.pl

index bb596449679376ae779a18a693ed0ccb37a66760..83fdc66715c01ed5525b892f8f3dfe8ac04fb01e 100755 (executable)
@@ -398,9 +398,13 @@ ${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) :  basic(TINFO_$
 
 ${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER})
 {
-       GINAC_ASSERT(vp!=0);
-       seq.swap(*vp);
-       delete vp;
+       if (vp == 0) {
+               // lst(0) ends up here
+               seq.push_back(0);
+       } else {
+               seq.swap(*vp);
+               delete vp;
+       }
 }
 
 ${CONTAINER}::${CONTAINER}(exvector::const_iterator b, exvector::const_iterator e) :  basic(TINFO_${CONTAINER}), seq(b, e)