SCP: Ignore trailing whitespace for all commands

This commit is contained in:
Mark Pizzolato 2018-05-18 08:32:03 -07:00
parent ded2b20fe0
commit b51d250598
2 changed files with 2 additions and 3 deletions

1
scp.c
View file

@ -8558,6 +8558,7 @@ if (0 == memcmp (cptr, "\xEF\xBB\xBF", 3)) /* Skip/ignore UTF8_BOM
memmove (cptr, cptr + 3, strlen (cptr + 3)); memmove (cptr, cptr + 3, strlen (cptr + 3));
while (sim_isspace (*cptr)) /* trim leading spc */ while (sim_isspace (*cptr)) /* trim leading spc */
cptr++; cptr++;
sim_trim_endspc (cptr); /* trim trailing spc */
if ((*cptr == ';') || (*cptr == '#')) { /* ignore comment */ if ((*cptr == ';') || (*cptr == '#')) { /* ignore comment */
if (sim_do_echo) /* echo comments if -v */ if (sim_do_echo) /* echo comments if -v */
sim_printf("%s> %s\n", do_position(), cptr); sim_printf("%s> %s\n", do_position(), cptr);

View file

@ -1636,8 +1636,6 @@ else {
c = (char)toupper (*tptr++); c = (char)toupper (*tptr++);
if (c == '/') { if (c == '/') {
val2 = strtotv (tptr, &tptr, 10); val2 = strtotv (tptr, &tptr, 10);
while (sim_isspace (*tptr))
++tptr;
if ((*tptr != '\0') || (val == 0)) if ((*tptr != '\0') || (val == 0))
return sim_messagef (SCPE_ARG, "Invalid throttle delay specifier: %s\n", cptr); return sim_messagef (SCPE_ARG, "Invalid throttle delay specifier: %s\n", cptr);
} }