소스 검색

[lua] fix issue where Process output occasionally is missing some data

Justin Donaldson 6 년 전
부모
커밋
3c905f0909
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      std/lua/_std/sys/io/Process.hx

+ 7 - 1
std/lua/_std/sys/io/Process.hx

@@ -151,7 +151,13 @@ private class ProcessInput extends haxe.io.Input {
 			idx = 0;
 			idx = 0;
 			var pending = true;
 			var pending = true;
 			b.read_start(function(err, chunk){
 			b.read_start(function(err, chunk){
-				if (chunk != null) buf = chunk;
+				if (chunk != null){
+					if (buf != null){
+						buf = buf + chunk;
+					} else {
+						buf = chunk;
+					}
+				}
 				if (err != null) err_str = err;
 				if (err != null) err_str = err;
 				pending = false;
 				pending = false;
 			});
 			});