Browse Source

修复死循环问题

yuxi-lee 3 years ago
parent
commit
9e57857e6c
1 changed files with 1 additions and 1 deletions
  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))
                     {