Windows: Fix crash in docker system prune
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
7caf77ac18
commit
e5900ee9bf
1 changed files with 2 additions and 0 deletions
|
@ -115,6 +115,8 @@ func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) {
|
||||||
countRecords := maxBytes / recordSize
|
countRecords := maxBytes / recordSize
|
||||||
if countRecords > ansiterm.MAX_INPUT_EVENTS {
|
if countRecords > ansiterm.MAX_INPUT_EVENTS {
|
||||||
countRecords = ansiterm.MAX_INPUT_EVENTS
|
countRecords = ansiterm.MAX_INPUT_EVENTS
|
||||||
|
} else if countRecords == 0 {
|
||||||
|
countRecords = 1
|
||||||
}
|
}
|
||||||
logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize)
|
logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue