From 540dd5ad02310fbfbda866fb22a682561e93ccff Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 10 Mar 2010 09:59:20 +0000 Subject: [PATCH] codetools: clean up git-svn-id: trunk@23913 - --- components/codetools/linkscanner.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index c69283ab73..e64677ba66 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -2403,12 +2403,14 @@ begin while (SrcPos<=SrcLen) and (IsIdentChar[Src[SrcPos]]) do inc(SrcPos); Result:=false; - for ModeSwitch := Succ(Low(ModeSwitch)) to High(ModeSwitch) do - if CompareUpToken(CompilerModeSwitchNames[ModeSwitch],Src,ValStart,SrcPos) then begin + for ModeSwitch := Succ(Low(ModeSwitch)) to High(ModeSwitch) do begin + if CompareUpToken(CompilerModeSwitchNames[ModeSwitch],Src,ValStart,SrcPos) + then begin Result:=true; CompilerModeSwitch:=ModeSwitch; break; end; + end; if not Result then RaiseExceptionFmt(ctsInvalidModeSwitch,[copy(Src,ValStart,SrcPos-ValStart)]); end;