瀏覽代碼

修复死循环问题

yuxi-lee 3 年之前
父節點
當前提交
9e57857e6c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      CMD/CMDHelper.cs

+ 1 - 1
CMD/CMDHelper.cs

@@ -24,7 +24,7 @@ namespace LJLib.Cmd
 
                 string rslt = string.Empty;
                 line = p.StandardOutput.ReadLine();
-                while (line != "exit")
+                while (!string.IsNullOrEmpty(line) && line != "exit")
                 {
                     if (string.IsNullOrEmpty(rslt))
                     {