[Libreoffice-commits] core.git: sc/source

Fridrich Å trba fridrich.strba at bluewin.ch
Mon Jun 3 05:52:26 PDT 2013


 sc/source/core/tool/rangeutl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 50bbd1aefe0c78c254a18cc6e1dfeaf5c6858112
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Mon Jun 3 14:51:24 2013 +0200

    Fix ooo51302-1.ods: check for special index value of -1
    
    Change-Id: I3fbb700300d18a878cbf23c94e35bc69f864824b

diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 054c61f..1fbf007 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -374,7 +374,7 @@ sal_Int32 ScRangeStringConverter::IndexOf(
     sal_Bool        bQuoted     = false;
     sal_Bool        bExitLoop   = false;
 
-    while( !bExitLoop && (nIndex < nLength) )
+    while( !bExitLoop && (nIndex >= 0 && nIndex < nLength) )
     {
         sal_Unicode cCode = rString[ nIndex ];
         bExitLoop = (cCode == cSearchChar) && !bQuoted;


More information about the Libreoffice-commits mailing list