Merge pull request #119 from liamg/vttest-changes

Prevent vttest crash with bounds checking
This commit is contained in:
Liam Galvin 2019-01-04 13:18:04 +00:00 committed by GitHub
commit d4c684c9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -903,6 +903,9 @@ func (buffer *Buffer) EraseDisplayToCursor() {
line := buffer.getCurrentLine()
for i := 0; i < int(buffer.cursorX); i++ {
if i >= len(line.cells) {
break
}
line.cells[i].erase()
}
for i := uint16(0); i < buffer.cursorY; i++ {