commit 5bb7857bb2d50c4e1cc0ca10e66ff32236acf900
Author: Georg Baum <[email protected]>
Date: Sun Mar 15 13:56:48 2015 +0100
Add missing check
The other insert method has this as well, and it is indeed a problem is pos
points outside the vector.
diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index edd8089..fe73aa8 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -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);
}