mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-12 20:31:13 +00:00
Test for !OK with system data addresses
This commit is contained in:
parent
4d4fbdf79a
commit
f555196080
@ -320,7 +320,13 @@ apple2_text_area(vm_area *area, vm_bitfont *font, size_t addr)
|
||||
// (0x0800-0x0BFF) respectively. If the given address is not in
|
||||
// those (contiguous) ranges, then let's bail.
|
||||
if (addr < 0x0400 || addr > 0x0BFF) {
|
||||
return 0;
|
||||
return ERR_INVALID;
|
||||
}
|
||||
|
||||
// Certain addresses are not meant to be displayable, and are
|
||||
// actually used for system data
|
||||
if (buffer_rows[addr] == -1 || buffer_cols[addr] == -1) {
|
||||
return ERR_INVALID;
|
||||
}
|
||||
|
||||
// In a given page for 40-column mode, you get 960 grid parts that
|
||||
|
@ -39,7 +39,7 @@ Test(apple2_text, area)
|
||||
vm_area area;
|
||||
|
||||
cr_assert_neq(apple2_text_area(&area, font, 0x0301), OK);
|
||||
cr_assert_neq(apple2_text_area(&area, font, 0x0461), OK);
|
||||
cr_assert_neq(apple2_text_area(&area, font, 0x04FB), OK);
|
||||
cr_assert_eq(apple2_text_area(&area, font, 0x0537), OK);
|
||||
|
||||
// FIXME: need a proper test for area; we're missing one because the
|
||||
|
Loading…
x
Reference in New Issue
Block a user