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:
authorEmre Demir <274893088+EmreO33@users.noreply.github.com>2026-11-22 13:28:05 +0300
committerEmre Demir <274893088+EmreO33@users.noreply.github.com>2026-11-22 13:28:05 +0300
commitfa4d54f22d8f20a4fd9ef9fc1880e36bbe0a3957 (patch)
tree0af904832274bfa68e4d17ee2592a29010db34ae /runtime/src/pe_loader.cpp
parentf85582e23d4ab9e19acbf694358f137d6b8531b1 (diff)
process shim: keep the game's command line wide so a non-ASCII argument can't crash --run (RT-84)
main.cpp turned each game argument into std::filesystem::path::string(), which throws std::system_error under MSVC when the ANSI code page has no mapping for a character. Nothing caught it, so gta6rt --run ended in 0xc0000409 before the game started. set_command_line now takes wide strings: __wargv and GetCommandLineW hold the arguments exactly, and the narrow argv and GetCommandLineA are their CP_ACP text from WideCharToMultiByte, which replaces a character the code page lacks instead of failing, as the CRT does. process_cmdline_test passes wide arguments and checks a Latin-1 one and a Greek, Cyrillic and CJK one that no single-byte code page holds, so the crash is covered on every system locale, not only 1253.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions