From b5f9e8abf0f584d479a2d4a215a2f6a7f6ef48f2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 13 Sep 2022 10:12:29 -0700 Subject: [PATCH] fix potential crash --- src/Grid.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grid.zig b/src/Grid.zig index 0b214fc6f..69387a33c 100644 --- a/src/Grid.zig +++ b/src/Grid.zig @@ -416,7 +416,7 @@ pub fn rebuildCells(self: *Grid, term: *Terminal) !void { // Get our new length and cache the cells. try row_cells.ensureTotalCapacity(self.alloc, term.screen.cols); row_cells.clearRetainingCapacity(); - row_cells.appendSliceAssumeCapacity(self.cells.items[start..]); + try row_cells.appendSlice(self.alloc, self.cells.items[start..]); // Set row is not dirty anymore row.setDirty(false);