Browse Source

* Correctly observe result of FileRead callback

git-svn-id: trunk@37793 -
michael 7 years ago
parent
commit
cb46e21bc3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      utils/pas2js/pas2jsfilecache.pp

+ 3 - 1
utils/pas2js/pas2jsfilecache.pp

@@ -868,7 +868,9 @@ begin
   Result:=false;
   try
     if Assigned(OnReadFile) then
-      if OnReadFile(Filename,Source) then exit;
+      Result:=OnReadFile(Filename,Source);
+    if Result then
+      Exit;
     ms:=TMemoryStream.Create;
     try
       ms.LoadFromFile(Filename);