diff --git a/src/grome/matrix.zig b/src/grome/matrix.zig index 818d861..d056eee 100644 --- a/src/grome/matrix.zig +++ b/src/grome/matrix.zig @@ -164,7 +164,7 @@ pub fn SubMatrix(comptime T: type) type { } pub fn get(self: *const @This(), loc: Point) !T { - if (loc.x >= self._mask.width or loc.y >= self._mask.width) { + if (loc.x >= self._mask.width or loc.y >= self._mask.height) { return Error.OutOfBounds; } diff --git a/src/view/draw.zig b/src/view/draw.zig index e42763a..2a405f9 100644 --- a/src/view/draw.zig +++ b/src/view/draw.zig @@ -40,8 +40,8 @@ pub const DoubleBuffer = struct { } pub fn deinit(self: *@This(), gpa: Allocator) void { - gpa.free(self.display); - gpa.free(self.write); + gpa.free(self.a); + gpa.free(self.b); } pub fn frame(self: *@This(), loc: Point, size: Rect) SubMatrix(Cell) {