mirror of
https://github.com/simh/simh.git
synced 2026-05-16 18:16:53 +00:00
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.
718 KiB
718 KiB