瀏覽代碼

Handle #13#10 line ending for Windows

git-svn-id: trunk@29727 -
pierre 10 年之前
父節點
當前提交
6e2b97a15c
共有 1 個文件被更改,包括 14 次插入5 次删除
  1. 14 5
      ide/gdbmiproc.pas

+ 14 - 5
ide/gdbmiproc.pas

@@ -59,11 +59,20 @@ begin
   while FProcess.Running do
   begin
     FProcess.Output.Read(C, 1);
-    if C = #10 then
-    begin
-      DebugLn(Result);
-      exit;
-    end;
+    {$ifdef windows}
+    { On windows we expect both #13 and #10 }
+    if C = #13 then
+      begin
+        FPRocess.Output.Read(C,1);
+    {$endif windows}
+        if C = #10 then
+        begin
+          DebugLn(Result);
+          exit;
+        end;
+    {$ifdef windows}
+      end;
+    {$endif windows}
     Result := Result + C;
   end;
 end;