diff options
author | th <th@openoffice.org> | 2001-03-19 10:05:46 +0000 |
---|---|---|
committer | th <th@openoffice.org> | 2001-03-19 10:05:46 +0000 |
commit | 3eae5562eb58a69bbde099b39b0c05a931ac5d99 (patch) | |
tree | d9a8872c765676c67079d157e68f308bc018e443 | |
parent | 90d66bd71f74ac8b96daf6d0382cf194b208a2f4 (diff) |
Correct lastIndexOfStr
-rw-r--r-- | sal/rtl/source/strtmpl.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sal/rtl/source/strtmpl.c b/sal/rtl/source/strtmpl.c index ebe2ef4cb48a..a97b341aab10 100644 --- a/sal/rtl/source/strtmpl.c +++ b/sal/rtl/source/strtmpl.c @@ -2,9 +2,9 @@ * * $RCSfile: strtmpl.c,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: th $ $Date: 2001-03-16 16:38:28 $ + * last change: $Author: th $ $Date: 2001-03-19 11:05:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -383,12 +383,8 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( lastIndexOfStr_WithLength )( const IMPL_RTL pStr += nStrLen; nStrLen -= nSubLen; pStr -= nSubLen; - while ( nStrLen >= nSubLen ) + while ( nStrLen >= 0 ) { - nStrLen--; - pStr--; - - { const IMPL_RTL_STRCODE* pTempStr1 = pStr; const IMPL_RTL_STRCODE* pTempStr2 = pSubStr; sal_Int32 nTempLen = nSubLen; @@ -404,7 +400,9 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( lastIndexOfStr_WithLength )( const IMPL_RTL if ( !nTempLen ) return nStrLen; - } + + nStrLen--; + pStr--; } } |