Browse Source

pastojs: fixed uninitialized result

git-svn-id: trunk@40620 -
Mattias Gaertner 6 years ago
parent
commit
765fdb7641
2 changed files with 4 additions and 1 deletions
  1. 3 0
      packages/pastojs/src/fppas2js.pp
  2. 1 1
      packages/pastojs/src/pas2jsfilecache.pp

+ 3 - 0
packages/pastojs/src/fppas2js.pp

@@ -374,6 +374,9 @@ ToDos:
     - functions
     - functions
     - rtti
     - rtti
 - bug: DoIt(typeinfo(i))  where DoIt is in another unit and has TTypeInfo
 - bug: DoIt(typeinfo(i))  where DoIt is in another unit and has TTypeInfo
+- $OPTIMIZATION ON|OFF
+- $optimization REMOVEEMPTYPROCS
+- $optimization REMOVEEMPTYPROCS,RemoveNotUsedDeclarations-
 - setlength(dynarray)  modeswitch to not create a copy
 - setlength(dynarray)  modeswitch to not create a copy
 - 'new', 'Function' -> class var use .prototype
 - 'new', 'Function' -> class var use .prototype
 - static arrays
 - static arrays

+ 1 - 1
packages/pastojs/src/pas2jsfilecache.pp

@@ -1896,7 +1896,7 @@ var
   // search in Dir for pp, pas, p times given case, lower case, upper case
   // search in Dir for pp, pas, p times given case, lower case, upper case
   begin
   begin
     Dir:=IncludeTrailingPathDelimiter(Dir);
     Dir:=IncludeTrailingPathDelimiter(Dir);
-    if IndexOfFile(SearchedDirs,Dir)>=0 then exit;
+    if IndexOfFile(SearchedDirs,Dir)>=0 then exit(false);
     SearchedDirs.Add(Dir);
     SearchedDirs.Add(Dir);
     Filename:=Dir+aUnitname+'.pp';
     Filename:=Dir+aUnitname+'.pp';
     if SearchLowUpCase(Filename) then exit(true);
     if SearchLowUpCase(Filename) then exit(true);