mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 21:09:36 +01:00
* small checks added to avoid accessing potentially unalloced mem.
git-svn-id: trunk@17860 -
This commit is contained in:
parent
765a792599
commit
4f12937bb3
@ -3524,18 +3524,18 @@ var
|
||||
Move(Start^, s[1], l)
|
||||
else
|
||||
exit;
|
||||
if s[1] = '-' then
|
||||
if (s[1] = '-') and (length(s)>1) then
|
||||
begin
|
||||
case s[2] of
|
||||
'd': // -d define
|
||||
Scanner.Defines.Append(UpperCase(Copy(s, 3, Length(s))));
|
||||
'F': // -F
|
||||
if s[3] = 'i' then // -Fi include path
|
||||
if (length(s)>2) and (s[3] = 'i') then // -Fi include path
|
||||
FileResolver.AddIncludePath(Copy(s, 4, Length(s)));
|
||||
'I': // -I include path
|
||||
FileResolver.AddIncludePath(Copy(s, 3, Length(s)));
|
||||
'S': // -S mode
|
||||
if s[3]='d' then
|
||||
if (length(s)>2) and (s[3]='d') then
|
||||
begin // -Sd mode delphi
|
||||
include(Scanner.Options,po_delphi);
|
||||
include(Parser.Options,po_delphi);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user