upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorsanuk369 <224479491+quackottu@users.noreply.github.com>2026-11-22 11:36:11 +0530
committersanuk369 <224479491+quackottu@users.noreply.github.com>2026-11-22 11:36:11 +0530
commit232dd31ceb3b4676fd7b04746dd63aa6bb22ffb1 (patch)
treecc1331691da6cfeb6ce607eef4b48dc1f989ba3e /runtime/src/pe_loader.cpp
parent43d470316ec6cbcd64002bc3792998d9f5745dac (diff)
process: the command line parses back to __wargv (backslash rules, ANSI code page)
quote() escaped quotes but ignored CommandLineToArgvW's backslash rules, so GetCommandLineA/W and __argv disagreed for an argument ending in a backslash ("C:\My Games\" next" parsed back as 2 arguments, not 3) or holding a backslash before a quote. A backslash run before a quote, or before the closing quote, is now doubled. widen() decoded the arguments as UTF-8, but main.cpp passes std::filesystem::path::string(), which is ANSI code page text, so cafe with an accent reached __wargv as caf\uFFFD. It widens from CP_ACP now; under a UTF-8 activeCodePage that is the same thing. New process_cmdline_test (ctest process_cmdline) checks that GetCommandLineW parses back to __wargv.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions