aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-06 16:09:18 +0100
committerGitHub <noreply@github.com>2025-08-06 16:09:18 +0100
commit09a1e170bc92a0ea48a8ee67599c2936e924fe4d (patch)
tree92b44b34a1f2f0c4a8c96a49ab61bb5177432ed7 /src/main.cpp
parentec7509430369eb5d57a081507792dc03b1c05bab (diff)
parentaf3184adc96cef59fff986ea6400caa6dbdb56ae (diff)
Merge pull request #5530 from odin-lang/bill/utf16-strings
UTF-16 string types: `string16` & `cstring16`
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 112d1208a..5a43e3c02 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -142,9 +142,9 @@ gb_internal i32 system_exec_command_line_app_internal(bool exit_on_err, char con
}
wcmd = string_to_string16(permanent_allocator(), make_string(cast(u8 *)cmd_line, cmd_len-1));
- if (CreateProcessW(nullptr, wcmd.text,
- nullptr, nullptr, true, 0, nullptr, nullptr,
- &start_info, &pi)) {
+ if (CreateProcessW(nullptr, cast(wchar_t *)wcmd.text,
+ nullptr, nullptr, true, 0, nullptr, nullptr,
+ &start_info, &pi)) {
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, cast(DWORD *)&exit_code);
@@ -232,7 +232,7 @@ gb_internal Array<String> setup_args(int argc, char const **argv) {
wchar_t **wargv = command_line_to_wargv(GetCommandLineW(), &wargc);
auto args = array_make<String>(a, 0, wargc);
for (isize i = 0; i < wargc; i++) {
- wchar_t *warg = wargv[i];
+ u16 *warg = cast(u16 *)wargv[i];
isize wlen = string16_len(warg);
String16 wstr = make_string16(warg, wlen);
String arg = string16_to_string(a, wstr);