Browse Source

* pas2jni: Fixed error handling of ppudump.

git-svn-id: trunk@36296 -
yury 8 years ago
parent
commit
376174d7ac
1 changed files with 2 additions and 1 deletions
  1. 2 1
      utils/pas2jni/ppuparser.pas

+ 2 - 1
utils/pas2jni/ppuparser.pas

@@ -169,7 +169,8 @@ begin
     end;
     end;
   end;
   end;
   ec:=ReadProcessOutput(ppudumpprog, '-Fj' + LineEnding + un, s, err);
   ec:=ReadProcessOutput(ppudumpprog, '-Fj' + LineEnding + un, s, err);
-  if Copy(s, 1, 1) <> '[' then begin
+  err:=Trim(err);
+  if (Copy(s, 1, 1) <> '[') and ((ec = 0) or (err = '')) then begin
     ec:=-1;
     ec:=-1;
     err:='Output of ppudump is not in JSON format.' + LineEnding + 'Probably old version of ppudump has been used.';
     err:='Output of ppudump is not in JSON format.' + LineEnding + 'Probably old version of ppudump has been used.';
   end;
   end;