From 4e6557b1dbef8051f3fca76bfb9e5c9bb27eb7b8 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Thu, 10 May 2001 15:29:19 +0000 Subject: corrected an index error --- idlc/source/astscope.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'idlc/source/astscope.cxx') diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index 4ea17b1fcd46..67248122b778 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -2,9 +2,9 @@ * * $RCSfile: astscope.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: pl $ $Date: 2001-05-10 13:07:49 $ + * last change: $Author: pl $ $Date: 2001-05-10 16:29:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -212,12 +212,16 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName) if ( bFindFirstScope && (firstScope != scopedName) ) { - sal_Int32 nIndex = 1; + sal_Int32 nIndex = 0; + sal_Int32 nOffset = 2; do { pScope = declAsScope(pDecl); if( pScope ) - pDecl = pScope->lookupByNameLocal(scopedName.getToken(1, ':', nIndex )); + { + pDecl = pScope->lookupByNameLocal(scopedName.getToken(nOffset, ':', nIndex )); + nOffset = 1; + } if( !pDecl ) return NULL; } while( nIndex != -1 ); -- cgit