diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-11-01 10:30:30 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-11-01 10:30:30 +0000 |
| commit | f36e7051c71f30bcbb524a7b695813b55c1035dd (patch) | |
| tree | c79ede241691c2a27976674141626c091761b103 /sys/dev/syscons | |
| parent | 5d933cfd98e1cdd3a6e8559505179b447bff3f58 (diff) | |
Notes
Diffstat (limited to 'sys/dev/syscons')
| -rw-r--r-- | sys/dev/syscons/scterm-teken.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index 36cfbb5d35f1..5dd1cbcea975 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -130,9 +130,12 @@ scteken_init(scr_stat *scp, void **softc, int code) tp.tp_col = scp->xsize; teken_set_winsize(&ts->ts_teken, &tp); - tp.tp_row = scp->cursor_pos / scp->xsize; - tp.tp_col = scp->cursor_pos % scp->xsize; - teken_set_cursor(&ts->ts_teken, &tp); + if (scp->cursor_pos < scp->ysize * scp->xsize) { + /* Valid old cursor position. */ + tp.tp_row = scp->cursor_pos / scp->xsize; + tp.tp_col = scp->cursor_pos % scp->xsize; + teken_set_cursor(&ts->ts_teken, &tp); + } break; } |
