newinfo->doubleheight != oldinfo->doubleheight) {
for(col = 0; col < screen->cols; col++) {
ScreenCell *cell = getcell(screen, row, col);
+ if (cell == NULL)
+ {
+ DEBUG_LOG2("libvterm: setlineinfo() position invalid: %d / %d",
+ row, col);
+ return 1;
+ }
cell->pen.dwl = newinfo->doublewidth;
cell->pen.dhl = newinfo->doubleheight;
}
ScreenCell *cell = getcell(screen, row, col);
int i;
+ if (cell == NULL)
+ {
+ DEBUG_LOG2("libvterm: _get_chars() position invalid: %d / %d",
+ row, col);
+ return 1;
+ }
if(cell->chars[0] == 0)
// Erased cell, might need a space
padding++;
{
VTermGlyphInfo info;
- if (pos.row >= state->rows)
- {
- DEBUG_LOG2("libvterm: putglyph() pos.row %d out of range (rows = %d)\n", pos.row, state.rows);
- return;
- }
info.chars = chars;
info.width = width;
info.protected_cell = state->protected_cell;
VTermPos oldpos = state->pos;
- if (state->pos.row >= state->rows)
- {
- DEBUG_LOG2("libvterm: on_text() pos.row %d out of range (rows = %d)\n", state->pos.row, state->rows);
- return 0;
- }
// We'll have at most len codepoints, plus one from a previous incomplete
// sequence.
codepoints = vterm_allocator_malloc(state->vt, (len + 1) * sizeof(uint32_t));
if(state->pos.row >= rows)
state->pos.row = rows - 1;
+ if(state->pos.row < 0)
+ state->pos.row = 0;
if(state->pos.col >= cols)
state->pos.col = cols - 1;
+ if(state->pos.col < 0)
+ state->pos.col = 0;
updatecursor(state, &oldpos, 1);