SCP: Fix recently revised breakpoint setup to behave properly breakpoint action is NULL
This commit is contained in:
parent
3951ad2432
commit
d0865d37f5
1 changed files with 7 additions and 3 deletions
4
scp.c
4
scp.c
|
@ -7727,10 +7727,14 @@ return sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth] = NULL;
|
||||||
|
|
||||||
void sim_brk_setact (const char *action)
|
void sim_brk_setact (const char *action)
|
||||||
{
|
{
|
||||||
|
if (action) {
|
||||||
sim_brk_act_buf[sim_do_depth] = realloc (sim_brk_act_buf[sim_do_depth], strlen (action) + 1);
|
sim_brk_act_buf[sim_do_depth] = realloc (sim_brk_act_buf[sim_do_depth], strlen (action) + 1);
|
||||||
strcpy (sim_brk_act_buf[sim_do_depth], action);
|
strcpy (sim_brk_act_buf[sim_do_depth], action);
|
||||||
sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth];
|
sim_brk_act[sim_do_depth] = sim_brk_act_buf[sim_do_depth];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sim_brk_clract ();
|
||||||
|
}
|
||||||
|
|
||||||
/* New PC */
|
/* New PC */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue