aboutsummaryrefslogtreecommitdiff
path: root/console.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-07 01:20:07 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-07 01:20:07 +0100
commitce73ed1672d0aa79d8ad92942777ec9227c838f8 (patch)
tree54280540d3beb0b273e9b6e3ddef2212bc3f5ba0 /console.go
parentf241be31593ff7e34cc8d415a6faffeb53ef6f54 (diff)
fix cr
Diffstat (limited to 'console.go')
-rw-r--r--console.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/console.go b/console.go
index a29c4ad..388b207 100644
--- a/console.go
+++ b/console.go
@@ -18,7 +18,11 @@ func NewConsole() *Console {
}
func (c *Console) Read(p []byte) (int, error) {
- return c.r.Read(p)
+ n, err := c.r.Read(p)
+ if n > 0 && p[0] == 10 {
+ p[0] = 13
+ }
+ return n, err
}
func (c *Console) Write(p []byte) (int, error) {