vt(4): Take font offset into account in vt_is_cursor_in_area()
This fixes a "General protection fault" in vt_vga, where vt_is_cursor_in_area() erroneously reported that the cursor was over the text. This led to negative integers stored in "unsigned int" and chaos. MFC after: 1 week
This commit is contained in:
parent
42782caf9b
commit
0878762c5b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270587
@ -828,8 +828,8 @@ vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area)
|
||||
* We use the cursor position saved during the current refresh,
|
||||
* in case the cursor moved since.
|
||||
*/
|
||||
mx = vd->vd_mx_drawn;
|
||||
my = vd->vd_my_drawn;
|
||||
mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_offset.tp_col;
|
||||
my = vd->vd_my_drawn + vd->vd_curwindow->vw_offset.tp_row;
|
||||
|
||||
x1 = area->tr_begin.tp_col;
|
||||
y1 = area->tr_begin.tp_row;
|
||||
|
Loading…
Reference in New Issue
Block a user