From d5d6e04313e397fecb988b76032df4f22acd7c9c Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Sat, 11 Feb 2023 23:03:01 -0800 Subject: [PATCH] Fix definition of `row_col` for affine screenblock (#177) I believe `TextScreenblockAddress` also needs to be split into types for size 0 to 3. --- src/mmio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mmio.rs b/src/mmio.rs index 3825dea..77b0f3f 100644 --- a/src/mmio.rs +++ b/src/mmio.rs @@ -345,7 +345,7 @@ macro_rules! make_affine_screenblock_address_type { pub const fn row_col(self, row: usize, col: usize) -> VolAddress { assert!(row < Self::HEIGHT, "`row` out of bounds."); assert!(col < Self::WIDTH, "`col` out of bounds."); - self.block.index(row * 32 + col) + self.block.index(row * Self::WIDTH + col) } #[inline]