Commit 034021d8 authored by Eric's avatar Eric Committed by Eric_Lee

fix bugs

parent 52d0fa45
...@@ -84,7 +84,7 @@ func (s *SwitchSession) generateCommandResult(command [2]string) *model.Command ...@@ -84,7 +84,7 @@ func (s *SwitchSession) generateCommandResult(command [2]string) *model.Command
input = command[0] input = command[0]
} }
i := strings.LastIndexByte(command[1], '\r') i := strings.LastIndexByte(command[1], '\r')
if i < 0 { if i <= 0 {
output = command[1] output = command[1]
} else if i > 0 && i < 1024 { } else if i > 0 && i < 1024 {
output = command[1][:i] output = command[1][:i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment