diff options
-rw-r--r-- | vcl/source/outdev/text.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 9a745bea0db5..c37951ec8cc4 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1124,6 +1124,7 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, for( i = 0; i < 2 * nLen; ++i ) if( pCaretXArray[ i ] >= 0 ) break; + assert(i < 2 * nLen); // otherwise i may go beyond the end of pCaretXArray long nXPos = pCaretXArray[ i ]; for( i = 0; i < 2 * nLen; ++i ) { |