mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
fix: promote dimensions to usize so cell_count doesn't overflow
This commit is contained in:
@ -116,7 +116,7 @@ pub const Contents = struct {
|
|||||||
) !void {
|
) !void {
|
||||||
self.size = size;
|
self.size = size;
|
||||||
|
|
||||||
const cell_count = size.columns * size.rows;
|
const cell_count = @as(usize, size.columns) * @as(usize, size.rows);
|
||||||
|
|
||||||
const bg_cells = try alloc.alloc(mtl_shaders.CellBg, cell_count);
|
const bg_cells = try alloc.alloc(mtl_shaders.CellBg, cell_count);
|
||||||
errdefer alloc.free(bg_cells);
|
errdefer alloc.free(bg_cells);
|
||||||
|
Reference in New Issue
Block a user