diff options
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 38d99f120830..c075a8ae6f59 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1737,8 +1737,11 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara ) ++nIdx; // Remove any entries *inside* the current run: - while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd ) - rTypes.erase( rTypes.begin()+nIdx ); + while (nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd) + { + // coverity[use_iterator] - we're protected from a bad iterator by the above condition + rTypes.erase(rTypes.begin() + nIdx); + } // special case: if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd) |