Browse Source

* fixed use of uninitialized "read" result in case 0 bytes were read, fixes
hang on Darwin/ppc

git-svn-id: trunk@24623 -

Jonas Maebe 12 years ago
parent
commit
2f29a6ebd3
1 changed files with 5 additions and 3 deletions
  1. 5 3
      utils/fpcm/fpmake.pp

+ 5 - 3
utils/fpcm/fpmake.pp

@@ -36,10 +36,12 @@ procedure fpcm_update_revision_info(Sender: TObject);
     if i = 0 then
       sleep(100);
     i := AProcess.Output.Read(b,1);
-    if b = 10 then
-      exit;
     if i > 0 then
-      ALine := ALine + chr(b);
+      begin
+        if b = 10 then
+          exit;
+        ALine := ALine + chr(b);
+      end;
     until not AProcess.Running and (i=0);
 
     result := (ALine <> '');