Explorar o código

修复死循环问题

yuxi-lee %!s(int64=3) %!d(string=hai) anos
pai
achega
9e57857e6c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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))
                     {