vcl/source/outdev/text.cxx | 1 + 1 file changed, 1 insertion(+) New commits: commit e3bd0951e6b8e8889aabc8640c5641ab32300517 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Fri Oct 16 10:36:23 2015 +0900
vcl: Assert that a non-negative nXPos is always found Change-Id: Ifb85cac1289af94102947b9064a8c12ca65ad43b Reviewed-on: https://gerrit.libreoffice.org/19404 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 9a745be..c37951e 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 ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits