Skip to content

Commit

Permalink
cmd/retro: minor fix in port 2 handler
Browse files Browse the repository at this point in the history
  • Loading branch information
db47h committed Aug 17, 2016
1 parent e39e371 commit 86adc2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/retro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func port2Handler(w io.Writer) func(i *vm.Instance, v, port vm.Cell) error {
}
t := i.Tos // save TOS
e = i.Wait(v, port)
if e == nil && t == 8 {
// th vm has written a backspace, erase char under cursor
if e == nil && t == 8 && i.Ports[port] == 0 {
// the vm has written a backspace, erase char under cursor
_, e = w.Write([]byte{32, 8})
}
return e
Expand Down

0 comments on commit 86adc2c

Please sign in to comment.