diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-12 14:58:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-12 14:58:06 +0200 |
commit | 3a16cb8b8e08d84f4a6cab39bfba6481918b169c (patch) | |
tree | b4aefa3ace77da9706e382e9d2066aa6d97771f4 /vcl | |
parent | aeed216756083eaf9b883025491d137800938f33 (diff) |
fix for "signed overflow is undefined" warning
introduced by my String->OUString conversions
Change-Id: I237c8fcf655d6f39f04512d1a386d0b6631f53c3
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/edit/texteng.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index d7cced4ae76b..65660ec6516b 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -809,10 +809,10 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString& if ( nEnd < aText.getLength() ) aPaM = ImpInsertParaBreak( aPaM ); - nStart = nEnd+1; - - if ( nStart < nEnd ) // #108611# overflow + if ( nEnd == aText.getLength() ) // #108611# prevent overflow in "nStart = nEnd+1" calculation break; + + nStart = nEnd+1; } UndoActionEnd(); |