mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Add string16 and cstring16 (UTF-16 based strings)
This commit is contained in:
@@ -59,7 +59,7 @@ struct Find_Result {
|
||||
};
|
||||
|
||||
gb_internal String mc_wstring_to_string(wchar_t const *str) {
|
||||
return string16_to_string(mc_allocator, make_string16_c(str));
|
||||
return string16_to_string(mc_allocator, make_string16_c(cast(u16 *)str));
|
||||
}
|
||||
|
||||
gb_internal String16 mc_string_to_wstring(String str) {
|
||||
@@ -103,7 +103,7 @@ gb_internal HANDLE mc_find_first(String wildcard, MC_Find_Data *find_data) {
|
||||
String16 wildcard_wide = mc_string_to_wstring(wildcard);
|
||||
defer (mc_free(wildcard_wide));
|
||||
|
||||
HANDLE handle = FindFirstFileW(wildcard_wide.text, &_find_data);
|
||||
HANDLE handle = FindFirstFileW(cast(wchar_t *)wildcard_wide.text, &_find_data);
|
||||
if (handle == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;
|
||||
|
||||
find_data->file_attributes = _find_data.dwFileAttributes;
|
||||
|
||||
Reference in New Issue
Block a user