mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 11:00:37 +02:00
codetools: fixed parsing $IFOpt if option is not defined
git-svn-id: trunk@59914 -
This commit is contained in:
parent
b0eae2930b
commit
0e5d9ae3c8
@ -4202,6 +4202,7 @@ end;
|
||||
function TLinkScanner.IfOptDirective: boolean;
|
||||
// {$ifopt o+} or {$ifopt o-}
|
||||
var Option, c: char;
|
||||
v: String;
|
||||
begin
|
||||
inc(IfLevel);
|
||||
if StoreDirectives then
|
||||
@ -4216,7 +4217,8 @@ begin
|
||||
if (SrcPos<=SrcLen) then begin
|
||||
c:=Src[SrcPos];
|
||||
if c in ['+','-'] then begin
|
||||
if (c='-')<>(Values.Variables[CompilerSwitchesNames[Option]]='0') then
|
||||
v:=Values.Variables[CompilerSwitchesNames[Option]];
|
||||
if (c='-')<>((v='0') or (v='')) then
|
||||
begin
|
||||
SkipTillEndifElse(lssdTillElse);
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user