diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index e7e3a4272b37..a40917246c6b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4827,7 +4827,7 @@ int RTFDocumentImpl::popState() // The first character is the length of the string (the rest should be ignored). sal_Int32 nLength(aStr.toChar()); OUString aValue; - if (nLength <= aStr.getLength()) + if (nLength < aStr.getLength()) aValue = aStr.copy(1, nLength); else aValue = aStr;