mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 17:52:59 +01:00
ANSI: make it so x position can't be negative
This commit is contained in:
parent
7606f81279
commit
84d1628cb7
@ -332,6 +332,9 @@ class File_ANSI
|
|||||||
case preg_match('#\x1B\[(\d+)D#', $this->ansi, $match): // Move cursor left n lines
|
case preg_match('#\x1B\[(\d+)D#', $this->ansi, $match): // Move cursor left n lines
|
||||||
$this->old_x = $this->x;
|
$this->old_x = $this->x;
|
||||||
$this->x-= $match[1];
|
$this->x-= $match[1];
|
||||||
|
if ($this->x < 0) {
|
||||||
|
$this->x = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case preg_match('#\x1B\[(\d+);(\d+)r#', $this->ansi, $match): // Set top and bottom lines of a window
|
case preg_match('#\x1B\[(\d+);(\d+)r#', $this->ansi, $match): // Set top and bottom lines of a window
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user