From 50c29e7334edeb20dad9f79774ea7959d07a13a9 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 24 Sep 2018 06:10:31 -0700 Subject: [PATCH] simplify --- src/comm/comm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comm/comm.go b/src/comm/comm.go index e59efc1..e7bbf1b 100644 --- a/src/comm/comm.go +++ b/src/comm/comm.go @@ -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 {