summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-16 12:49:05 -0700
committerJeff Carr <[email protected]>2019-06-16 12:49:05 -0700
commitf2fa2c1d3188264c5fa9f65812c4c35931f63fc9 (patch)
treebb0716b87ce0c6593e154ccf2f4dbf7c79809936
parent5d4ad13b7736b08ae8987dd31706c90f36a0118a (diff)
trim null
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--run.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/run.go b/run.go
index 3e24793..bea5a1a 100644
--- a/run.go
+++ b/run.go
@@ -179,6 +179,6 @@ func (cmd *Shell) ReadToBuffer(f *File) bool {
// log.Debugln("ReadToBuffer() count = ", count)
// tmp := Chomp(oneByte)
// log.Debugln("ReadToBuffer() tmp = ", tmp)
- io.WriteString(cmd.Buffer, string(oneByte))
+ io.WriteString(cmd.Buffer, strings.Trim(string(oneByte), "\x00"))
return false
}