fix segfault. Closes T1286
This commit is contained in:
parent
503dd08105
commit
e51c2168e9
|
@ -946,6 +946,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
|
||||||
{
|
{
|
||||||
DBG("2 regions args: %i %i", arg, arg2);
|
DBG("2 regions args: %i %i", arg, arg2);
|
||||||
if (arg >= ty->h) arg = ty->h - 1;
|
if (arg >= ty->h) arg = ty->h - 1;
|
||||||
|
if (arg == 0) arg = 1;
|
||||||
if (arg2 > ty->h) arg2 = ty->h;
|
if (arg2 > ty->h) arg2 = ty->h;
|
||||||
ty->state.scroll_y1 = arg - 1;
|
ty->state.scroll_y1 = arg - 1;
|
||||||
ty->state.scroll_y2 = arg2;
|
ty->state.scroll_y2 = arg2;
|
||||||
|
|
|
@ -92,7 +92,7 @@ _termpty_text_scroll(Termpty *ty, Eina_Bool clear)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cells = &(TERMPTY_SCREEN(ty, 0, end_y));
|
cells = &(TERMPTY_SCREEN(ty, 0, end_y));
|
||||||
for (y = start_y; y < end_y; y++)
|
for (y = start_y; y < end_y - 1; y++)
|
||||||
{
|
{
|
||||||
cells = &(TERMPTY_SCREEN(ty, 0, (y + 1)));
|
cells = &(TERMPTY_SCREEN(ty, 0, (y + 1)));
|
||||||
cells2 = &(TERMPTY_SCREEN(ty, 0, y));
|
cells2 = &(TERMPTY_SCREEN(ty, 0, y));
|
||||||
|
|
Loading…
Reference in New Issue