Merge branch '4192_shadows_out_of_screen'

* 4192_shadows_out_of_screen:
  Ticket #4192: fix crash if shadow is out of screen.
This commit is contained in:
Andrew Borodin 2021-02-03 09:51:45 +03:00
commit a34525c5fa

View File

@ -152,9 +152,16 @@ tty_clip (int *y, int *x, int *rows, int *cols)
if (*y + *rows > LINES)
*rows = LINES - *y;
if (*rows <= 0)
return FALSE;
if (*x + *cols > COLS)
*cols = COLS - *x;
if (*cols <= 0)
return FALSE;
return TRUE;
}