Commit Graph

1 Commits

Author SHA1 Message Date
Doston Abdullayev 5cb7de6ba9 fix(libkernel): return every command-line argument as UTF-8 from getargv on Windows
On Windows, getargc and getargv reported only the executable path, read
with GetModuleFileNameA in the ANSI code page, and dropped every other
argument. Linux returns the whole command line from /proc/self/cmdline,
and the relinker's Windows entry stub already passes the guest entry all
arguments converted to UTF-8.

Parse GetCommandLineW with CommandLineToArgvW and convert each argument
to UTF-8 with WC_ERR_INVALID_CHARS, as the entry stub does, so getargv
matches the entry's argv and the Linux behaviour. The Linux path is
unchanged.
2026-10-10 21:20:29 +13:00