Fix off-by-one error in syswin.inc:setup_arguments.
There was an off-by-one error in !643 (merged) cmdLine - 1
rather than cmdLine
.
The error cancels out unless your DefaultSystemCodePage
allows multibyte sequences, and the first character of the second argument (first argument is completely skipped) needs such a sequence. This example copypastes setup_arguments
and sets up the bad case: argv.pas, run it under -gh: Use heaptrace unit
, you should get Marked memory at XXX invalid
.