summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-09 16:08:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-11 11:20:17 +0000
commitb8100e1c75dbad75bffb64db94c2b40f75e2ed28 (patch)
tree2167f728bd3489feea9e927b043c79fcc125789a /sw
parent0707938e49636759459ba20d94beb848825d826c (diff)
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@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/breakit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 0e3aeea60f62..9aec54d4a899 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