From 90cfa3c9787fd26892a29f467f02be311ed7a73f Mon Sep 17 00:00:00 2001 From: john xu Date: Sun, 28 Dec 2025 12:35:35 +0000 Subject: [PATCH] Use <= in InternalScreen bounds checks --- src/InternalScreen.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/InternalScreen.zig b/src/InternalScreen.zig index 412a4ea..699e9e9 100644 --- a/src/InternalScreen.zig +++ b/src/InternalScreen.zig @@ -83,11 +83,11 @@ pub fn writeCell( row: u16, cell: Cell, ) void { - if (col >= self.width) { + if (self.width <= col) { // column out of bounds return; } - if (row >= self.height) { + if (self.height <= row) { // height out of bounds return; } @@ -110,11 +110,11 @@ pub fn writeCell( } pub fn readCell(self: *InternalScreen, col: u16, row: u16) ?Cell { - if (col >= self.width) { + if (self.width <= col) { // column out of bounds return null; } - if (row >= self.height) { + if (self.height <= row) { // height out of bounds return null; } -- 2.51.2