Skip to content

Commit 19b2634

Browse files
committed
fmt: Formatted Vaxis.zig
1 parent 9f7f207 commit 19b2634

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Vaxis.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub const Options = struct {
4949
system_clipboard_allocator: ?std.mem.Allocator = null,
5050
};
5151

52+
5253
/// the screen we write to
5354
screen: Screen,
5455
/// The last screen we drew. We keep this so we can efficiently update on
@@ -190,6 +191,10 @@ pub fn resize(
190191
tty: *IoWriter,
191192
winsize: Winsize,
192193
) !void {
194+
_ = std.math.mul(u16, winsize.cols, winsize.rows) catch {
195+
log.warn("Invalid Screen Size: width={d} height={d}", .{ winsize.cols, winsize.rows });
196+
return;
197+
};
193198
log.debug("resizing screen: width={d} height={d}", .{ winsize.cols, winsize.rows });
194199
self.screen.deinit(alloc);
195200
self.screen = try Screen.init(alloc, winsize);

0 commit comments

Comments
 (0)