]> git.lyx.org Git - features.git/commitdiff
Add missing check
authorGeorg Baum <baum@lyx.org>
Sun, 15 Mar 2015 12:56:48 +0000 (13:56 +0100)
committerGeorg Baum <baum@lyx.org>
Sun, 15 Mar 2015 12:56:48 +0000 (13:56 +0100)
The other insert method has this as well, and it is indeed a problem is pos
points outside the vector.

src/mathed/MathData.cpp

index edd808945721cd071b2209ddd29d2ef264a8d78d..fe73aa8965305a40d6400b497b564d3d9cb9e8a7 100644 (file)
@@ -68,6 +68,7 @@ MathAtom const & MathData::operator[](pos_type pos) const
 
 void MathData::insert(size_type pos, MathAtom const & t)
 {
+       LBUFERR(pos <= size());
        base_type::insert(begin() + pos, t);
 }