diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-18 13:44:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-18 15:06:20 +0100 |
commit | 5b6dcac8dca72583e25213331bbadc5ec1973646 (patch) | |
tree | ab080c6f620f8aa9bb9059427686525057bb65bb /editeng | |
parent | don't access string out of bounds (diff) | |
download | core-5b6dcac8dca72583e25213331bbadc5ec1973646.tar.gz core-5b6dcac8dca72583e25213331bbadc5ec1973646.zip |
comparision of STRING_NOTFOUND to OUString::indexOf
Change-Id: I5ad12b594143a3e9ab2399836d30e48deb656639
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 2e932e786bfe..ab82308b912b 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -653,8 +653,8 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace( } // Check the presence of "://" in the word - xub_StrLen nStrPos = rTxt.indexOf( "://", nSttWdPos + 1 ); - if ( STRING_NOTFOUND == nStrPos && nEndPos > 0 ) + sal_Int32 nStrPos = rTxt.indexOf( "://", nSttWdPos + 1 ); + if ( nStrPos == -1 && nEndPos > 0 ) { // Check the previous char sal_Unicode cPrevChar = rTxt[ nEndPos - 1 ]; |