1
0
mirror of https://github.com/simh/simh.git synced 2026-02-27 01:00:07 +00:00

swtp6800: Correct address bound on memory write

This commit is contained in:
Bill Beech
2020-02-04 16:26:29 -07:00
parent a2998ebaf2
commit 08330de7f4

View File

@@ -187,7 +187,7 @@ void mp_8m_put_mbyte(int32 addr, int32 val)
uptr = mp_8m_dev.units + i;
org = uptr->u3;
len = uptr->capac - 1;
if ((addr >= org) && (addr < org + len)) {
if ((addr >= org) && (addr <= org + len)) {
*((uint8 *)(uptr->filebuf) + (addr - org)) = val & 0xFF;
sim_debug (DEBUG_write, &mp_8m_dev, "\n");
return;