Просмотр исходного кода

Merge branch 'is-6' into compiler-update

Martijn Laan 6 лет назад
Родитель
Сommit
e31115142a
2 измененных файлов с 9 добавлено и 5 удалено
  1. 1 1
      Projects/ISPP/Help/isetup.dtd
  2. 8 4
      Projects/ScriptRunner.pas

+ 1 - 1
Projects/ISPP/Help/isetup.dtd

@@ -72,7 +72,7 @@
 
 <!-- Fancier block elements -->
 
-<!ELEMENT ul (li*)>
+<!ELEMENT ul (li|ul)*>
 <!ATTLIST ul appearance (normal|compact) "normal">
 <!ELEMENT ol (li*)>
 <!ELEMENT li %InlineOrBlock;>

+ 8 - 4
Projects/ScriptRunner.pas

@@ -459,12 +459,13 @@ function TScriptRunner.InternalRunBooleanFunction(const Name: AnsiString; const
 var
   ProcNos, Params: TPSList;
   Res: PPSVariant;
+  ProcResult: Boolean;
   I: Integer;
 begin
   ProcNos := TPSList.Create;
   try
     if GetProcNos(Name, CheckNamingAttribute, ProcNos) <> 0 then begin
-      Result := True;
+      Result := True; { Silence compiler }
       for I := 0 to ProcNos.Count-1 do begin
         Params := TPSList.Create();
         try
@@ -474,10 +475,13 @@ begin
           WriteBackParameters(Parameters, Params);
 
           RaisePSExecException;
-          if CheckNamingAttributeAndResults then
-            Result := Result and (PPSVariantU8(Res).Data = 1) { Don't break on Result = False: need to call all procs always. }
+          ProcResult := PPSVariantU8(Res).Data = 1;
+          if I = 0 then
+            Result := ProcResult
+          else if CheckNamingAttributeAndResults then
+            Result := Result and ProcResult { Don't break on Result = False: need to call all procs always. }
           else
-            Result := Result or (PPSVariantU8(Res).Data = 1) { Don't break on Result = True: need to call all procs always. }
+            Result := Result or ProcResult { Don't break on Result = True: need to call all procs always. }
         finally
           FreePSVariantList(Params);
         end;