summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/mathtype.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 4eab25b87c15..2d25623bdc8b 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -2895,7 +2895,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel,
OUString aStr;
TypeFaceToString(aStr,nOldTypeFace);
aStr += "\"";
- rRet.insert(rTextStart, aStr);
+ rRet.insert(std::min(rTextStart, rRet.getLength()), aStr);
aStr.clear();
TypeFaceToString(aStr,nTypeFace);