Added a memory write boundary protection in the ram watch window to prevent users from writing into ROM memory area.

This commit is contained in:
Matthew Budd 2020-05-23 16:28:43 -04:00
parent c46d3e2a9d
commit 40379a32dc
1 changed files with 44 additions and 41 deletions

View File

@ -948,6 +948,8 @@ static void ramWatch_cell_edited_cb (GtkCellRendererText * cell,
break; break;
case 1: case 1:
case 2: case 2:
{
if ( (rw->addr >= 0) && (rw->addr < 0x8000) )
{ {
writefunc wfunc; writefunc wfunc;
@ -999,6 +1001,7 @@ static void ramWatch_cell_edited_cb (GtkCellRendererText * cell,
} }
} }
} }
}
break; break;
case 3: case 3:
rw->name.assign (new_text); rw->name.assign (new_text);