mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use integers instead of non-printable chars in the escape sequence detection
This commit is contained in:
parent
8f41f1fa60
commit
626bfd87a7
1 changed files with 4 additions and 2 deletions
6
utils.go
6
utils.go
|
@ -349,9 +349,11 @@ func CopyEscapable(dst io.Writer, src io.ReadCloser) (written int64, err error)
|
|||
nr, er := src.Read(buf)
|
||||
if nr > 0 {
|
||||
// ---- Docker addition
|
||||
if nr == 1 && buf[0] == '' {
|
||||
// char 16 is C-p
|
||||
if nr == 1 && buf[0] == 16 {
|
||||
nr, er = src.Read(buf)
|
||||
if nr == 1 && buf[0] == '' {
|
||||
// char 17 is C-q
|
||||
if nr == 1 && buf[0] == 17 {
|
||||
if err := src.Close(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue