Fix definition of row_col for affine screenblock (#177)

I believe `TextScreenblockAddress` also needs to be split into types for
size 0 to 3.
This commit is contained in:
Ian Douglas Scott 2023-02-11 23:03:01 -08:00 committed by GitHub
parent a9425f45ce
commit d5d6e04313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,7 +345,7 @@ macro_rules! make_affine_screenblock_address_type {
pub const fn row_col(self, row: usize, col: usize) -> VolAddress<u8x2, Safe, Safe> {
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]