[Issue 12848] crash in _d_run_main() on some unicode command line argument (Win32)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jun 4 16:05:58 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12848
--- Comment #1 from Martin Krejcirik <mk at krej.cz> ---
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L303
Actually this assert fails, because argc contains wrong number of arguments
(wargc is right). argc is set before C main(), where startup code calls
GetCommandLineA and then _setargv, which fails to recognize correctly number of
arguments. Also argv string is in the Windows charset at this stage.
So the solution seem to be either to fix the startup code or to "fix" argc and
argv later using windows API W functions.
--
More information about the Digitalmars-d-bugs
mailing list