1
0
mirror of https://github.com/simh/simh.git synced 2026-05-16 18:16:53 +00:00
Files
simh.simh/scp.c
Mark Pizzolato a49c910b9a SCP: Fix %* expansion path in sim_sub_args
This problem here was reported by Perry Metzger since the original
logic had two problems:

1) the buffer-space check is inverted, so ordinary %* expansion usually
    produces an empty string instead of the remaining DO arguments
2) the quoted-argument format string appends an extra stray " at the end

Perry's suggested fix had the inverted test corrected, but the resulting
test incorrectly left out the buffer's potential need for a total of 4 bytes.
One for a possible leading space, and 2 for possible quote characters
and one more for a trailing NUL character.
2026-05-08 07:19:57 -10:00

718 KiB