mirror of https://github.com/schollz/croc.git
simplify
This commit is contained in:
parent
711f8dfeec
commit
50c29e7334
|
@ -67,7 +67,7 @@ func (c Comm) Read() (buf []byte, numBytes int, bs []byte, err error) {
|
|||
}
|
||||
tmp = bytes.TrimRight(tmp, "\x00")
|
||||
copy(buf[bufStart:bufStart+len(tmp)], tmp[:])
|
||||
bufStart += len(tmp)
|
||||
bufStart = len(buf)
|
||||
if bufStart < numBytes {
|
||||
tmp = tmp[:numBytes-bufStart]
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue