Explorar el Código

修复死循环问题

yuxi-lee hace 3 años
padre
commit
9e57857e6c
Se han modificado 1 ficheros con 1 adiciones y 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))
                     {