* several files: subsequent changes
* several files: subsequent changes
+ * array.C: fix bug when insets have not been cloned properly
+ This should fix quite a few "random" crashes...
+
2001-06-29 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* formulabase.C (localDispatch): use .c_str() on istringstream
2001-06-29 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* formulabase.C (localDispatch): use .c_str() on istringstream
void MathArray::insert(int pos, MathArray const & array)
{
void MathArray::insert(int pos, MathArray const & array)
{
-#ifdef WITH_WARNINGS
-#warning quick and really dirty: make sure that we really own our insets
-#endif
- MathArray a = array;
- bf_.insert(bf_.begin() + pos, a.bf_.begin(), a.bf_.end());
+ bf_.insert(bf_.begin() + pos, array.bf_.begin(), array.bf_.end());
+ for (int p = pos; p < pos + array.size(); next(p))
+ if (isInset(p))
+ replace(p, GetInset(p)->clone());