render: check bounds when setting skipped
A double-wide character in the last cell can force this to go OOB. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
parent
378984bd87
commit
6dafeb7820
1 changed files with 1 additions and 0 deletions
|
@ -300,6 +300,7 @@ pub fn Vaxis(comptime T: type) type {
|
||||||
std.debug.assert(w > 0);
|
std.debug.assert(w > 0);
|
||||||
var j = i + 1;
|
var j = i + 1;
|
||||||
while (j < i + w) : (j += 1) {
|
while (j < i + w) : (j += 1) {
|
||||||
|
if (j >= self.screen_last.buf.len) break;
|
||||||
self.screen_last.buf[j].skipped = true;
|
self.screen_last.buf[j].skipped = true;
|
||||||
}
|
}
|
||||||
col += w;
|
col += w;
|
||||||
|
|
Loading…
Reference in a new issue