Skip to content

Commit

Permalink
ANSI: fix "Number of elements can't be negative" error
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed May 10, 2020
1 parent a07f5bc commit bcaa494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpseclib/File/ANSI.php
Expand Up @@ -299,7 +299,7 @@ function appendString($source)
case "\x1B[K": // Clear screen from cursor right
$this->screen[$this->y] = substr($this->screen[$this->y], 0, $this->x);

array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - $this->x - 1, $this->base_attr_cell));
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - ($this->x - 1), $this->base_attr_cell));
break;
case "\x1B[2K": // Clear entire line
$this->screen[$this->y] = str_repeat(' ', $this->x);
Expand Down

0 comments on commit bcaa494

Please sign in to comment.