diff options
| author | Emre Demir <274893088+EmreO33@users.noreply.github.com> | 2026-11-22 13:28:05 +0300 |
|---|---|---|
| committer | Emre Demir <274893088+EmreO33@users.noreply.github.com> | 2026-11-22 13:28:05 +0300 |
| commit | fa4d54f22d8f20a4fd9ef9fc1880e36bbe0a3957 (patch) | |
| tree | 0af904832274bfa68e4d17ee2592a29010db34ae /runtime/test/tiny_game_exit_code_test.cpp | |
| parent | f85582e23d4ab9e19acbf694358f137d6b8531b1 (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/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions