SCP: Fix remote console command table ordering to have STEP near the beginning

This allowed user entered S to match the SAMPLEOUT command instead
of STEP.  That then identified a bug in the intended socket output
processing to attempt to be written to the undefined debug file.

As discussed in #854
This commit is contained in:
Mark Pizzolato 2020-05-22 10:12:11 -07:00
parent ca51776ec7
commit 5ec4b3f2f4
2 changed files with 2 additions and 2 deletions

2
scp.c
View file

@ -13562,7 +13562,7 @@ int Fprintf (FILE *f, const char* fmt, ...)
int ret = 0;
va_list args;
if (sim_mfile || (f == sim_deb)) {
if (sim_mfile || (sim_deb && (f == sim_deb))) {
char stackbuf[STACKBUFSIZE];
int32 bufsize = sizeof(stackbuf);
char *buf = stackbuf;

View file

@ -772,11 +772,11 @@ static CTAB allowed_master_remote_cmds[] = {
{ "ASSIGN", &assign_cmd, 0 },
{ "DEASSIGN", &deassign_cmd, 0 },
{ "CONTINUE", &x_continue_cmd, 0 },
{ "STEP", &x_step_cmd, 0 },
{ "REPEAT", &x_repeat_cmd, 0 },
{ "COLLECT", &x_collect_cmd, 0 },
{ "SAMPLEOUT",&x_sampleout_cmd, 0 },
{ "EXECUTE", &x_execute_cmd, 0 },
{ "STEP", &x_step_cmd, 0 },
{ "PWD", &pwd_cmd, 0 },
{ "SAVE", &save_cmd, 0 },
{ "CD", &set_default_cmd, 0 },