We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f7f207 commit 19b2634Copy full SHA for 19b2634
1 file changed
src/Vaxis.zig
@@ -49,6 +49,7 @@ pub const Options = struct {
49
system_clipboard_allocator: ?std.mem.Allocator = null,
50
};
51
52
+
53
/// the screen we write to
54
screen: Screen,
55
/// The last screen we drew. We keep this so we can efficiently update on
@@ -190,6 +191,10 @@ pub fn resize(
190
191
tty: *IoWriter,
192
winsize: Winsize,
193
) !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
+ };
198
log.debug("resizing screen: width={d} height={d}", .{ winsize.cols, winsize.rows });
199
self.screen.deinit(alloc);
200
self.screen = try Screen.init(alloc, winsize);
0 commit comments