diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-11-02 00:19:29 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-02 00:22:44 +0100 |
commit | 86b79ea1f6afb709f2de8141810a61e4162e3125 (patch) | |
tree | 2811e99724b95bc367dc1c838c93c1f45fedd387 | |
parent | d8fbc8432da8db0b9ad364b917637a2432c58deb (diff) |
starmath: Check for text length.
Fixes fdo32667-1.doc.
Change-Id: Ibe7a9ca83b65e7b13c6b315f1b771f50f0b6fc7a
-rw-r--r-- | starmath/source/mathtype.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 58053e48cc00..d8c93ef88404 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -606,9 +606,9 @@ int MathType::Parse(SotStorage *pStor) static void lcl_PrependDummyTerm(OUString &rRet, sal_Int32 &rTextStart) { - if ((rRet[rTextStart] == '=') && - ((rTextStart == 0) || - (rRet[ rTextStart-1 ] == '{')) + if ((rTextStart < rRet.getLength()) && + (rRet[rTextStart] == '=') && + ((rTextStart == 0) || (rRet[ rTextStart-1 ] == '{')) ) { rRet = rRet.replaceAt(rTextStart,0," {}"); |