mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-19 06:13:07 +03:00
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:
commit
a34525c5fa
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user