Browse Source

* fixed invalid memory read in tp-mode when parsing uses clause

git-svn-id: trunk@2505 -
peter 19 years ago
parent
commit
e2383470b8
1 changed files with 4 additions and 7 deletions
  1. 4 7
      compiler/pmodules.pas

+ 4 - 7
compiler/pmodules.pas

@@ -529,13 +529,10 @@ implementation
            sorg:=orgpattern;
            consume(_ID);
            { support "<unit> in '<file>'" construct, but not for tp7 }
-           if not(m_tp7 in aktmodeswitches) then
-            begin
-              if try_to_consume(_OP_IN) then
-               fn:=FixFileName(get_stringconst)
-              else
-               fn:='';
-            end;
+           fn:='';
+           if not(m_tp7 in aktmodeswitches) and
+              try_to_consume(_OP_IN) then
+             fn:=FixFileName(get_stringconst);
            { Give a warning if objpas is loaded }
            if s='OBJPAS' then
             Message(parser_w_no_objpas_use_mode);