Skip to content

Commit 93e4499

Browse files
committed
[view_curses] fix overflow
1 parent 97bf9d6 commit 93e4499

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/view_curses.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@ view_curses::mvwattrline(ncplane* window,
421421
lpc_start, wcw_res - (lpc - lpc_start));
422422
}
423423
curr_ch_col_count = wcw_res;
424-
has_icon[char_index] = true;
424+
if (char_index < line_width_chars + 1) {
425+
has_icon[char_index] = true;
426+
}
425427
char_index += wcw_res;
426428
if (lr_bytes.lr_end == -1 && char_index > lr_chars.lr_end) {
427429
lr_bytes.lr_end = exp_start_index;

0 commit comments

Comments
 (0)