Kaydet (Commit) e3bd0951 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

vcl: Assert that a non-negative nXPos is always found

Change-Id: Ifb85cac1289af94102947b9064a8c12ca65ad43b
Reviewed-on: https://gerrit.libreoffice.org/19404Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4c34ae20
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment