[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source
Caolán McNamara
caolanm at redhat.com
Sat Oct 11 04:20:39 PDT 2014
sw/source/core/bastyp/breakit.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b8100e1c75dbad75bffb64db94c2b40f75e2ed28
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Oct 9 16:08:22 2014 +0100
Resolves: fdo#65823 crash on negative position in redlined word
there is possibly something deeper wrong here I think after all, see
946ea643185af680508a0333f63c086ed3f454a3 Resolves: fdo#84649 as well but for
now silence this and I can investigate further later
Change-Id: I1323584d1f71c14634d56ad4e4a705496b1bd1c0
(cherry picked from commit d7418f8831acdff907d404c1701870b00e974df6)
Reviewed-on: https://gerrit.libreoffice.org/11884
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 0e3aeea..9aec54d 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -105,7 +105,7 @@ sal_uInt16 SwBreakIt::GetRealScriptOfText( const OUString& rTxt, sal_Int32 nPos
--nPos;
nScript = xBreak->getScriptType( rTxt, nPos );
sal_Int32 nChgPos = 0;
- if ( i18n::ScriptType::WEAK == nScript && nPos + 1 < rTxt.getLength() )
+ if (i18n::ScriptType::WEAK == nScript && nPos >= 0 && nPos + 1 < rTxt.getLength())
{
// A weak character followed by a mark may be meant to combine with
// the mark, so prefer the following character's script
More information about the Libreoffice-commits
mailing list