this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use <= in InternalScreen bounds checks

authored by

john xu and committed by
Tim Culverhouse
90cfa3c9 3943a6f4

+4 -4
+4 -4
src/InternalScreen.zig
··· 83 83 row: u16, 84 84 cell: Cell, 85 85 ) void { 86 - if (col >= self.width) { 86 + if (self.width <= col) { 87 87 // column out of bounds 88 88 return; 89 89 } 90 - if (row >= self.height) { 90 + if (self.height <= row) { 91 91 // height out of bounds 92 92 return; 93 93 } ··· 110 110 } 111 111 112 112 pub fn readCell(self: *InternalScreen, col: u16, row: u16) ?Cell { 113 - if (col >= self.width) { 113 + if (self.width <= col) { 114 114 // column out of bounds 115 115 return null; 116 116 } 117 - if (row >= self.height) { 117 + if (self.height <= row) { 118 118 // height out of bounds 119 119 return null; 120 120 }