summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorGregor Hartmann <gh@openoffice.org>2002-01-21 09:29:47 +0000
committerGregor Hartmann <gh@openoffice.org>2002-01-21 09:29:47 +0000
commit96cf95505f768568d5f8ed51539e05273181ce03 (patch)
tree0438e428c400b07e8549610ac7e8f1a07bfc29e4 /tools/source
parent9554bf3907b6c41aab29b0b4a33c3557bbacdc8a (diff)
small error indexing a string
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/communi/parser.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/source/communi/parser.cxx b/tools/source/communi/parser.cxx
index ee4630199160..d53160fbfd38 100644
--- a/tools/source/communi/parser.cxx
+++ b/tools/source/communi/parser.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: parser.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: gh $ $Date: 2002-01-11 09:33:12 $
+ * last change: $Author: gh $ $Date: 2002-01-21 10:29:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,22 +110,22 @@ ByteString &InformationParser::ReadLine()
if ( !pActStream->IsEof()) {
pActStream->ReadLine( sLine );
ULONG nStart = 0;
- ULONG nEnd = sLine.Len()-1;
+ ULONG nEnd = sLine.Len();
BOOL bCopy = FALSE;
- while ( nStart <= nEnd && ( sLine.GetChar( nStart ) == ' ' || sLine.GetChar( nStart ) == 0x09 ) )
+ while ( nStart < nEnd && ( sLine.GetChar( nStart ) == ' ' || sLine.GetChar( nStart ) == 0x09 ) )
{
nStart++;
bCopy = TRUE;
}
- while ( nStart <= nEnd && ( sLine.GetChar( nEnd ) == ' ' || sLine.GetChar( nEnd ) == 0x09 ) )
+ while ( nStart < nEnd && ( sLine.GetChar( nEnd-1 ) == ' ' || sLine.GetChar( nEnd-1 ) == 0x09 ) )
{
nEnd--;
bCopy = TRUE;
}
if ( bCopy )
- sLine = sLine.Copy( nStart, nEnd - nStart +1 );
+ sLine = sLine.Copy( nStart, nEnd - nStart );
if (( sLine.GetChar( 0 ) == '#' ) || ( !sLine.Len())) {
if ( sCurrentComment.Len())