Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_text_input.c:
NtUserImeDriverCall, FALSE);
}
+static WCHAR *get_wide_string(const char *str) +{
- WCHAR *output;
- DWORD output_len;
- size_t str_len = strlen(str);
- if (!(output = malloc((str_len + 1) * sizeof(WCHAR))))
return NULL;
- output_len = ntdll_umbstowcs(str, str_len, output, str_len);
- output[output_len] = 0;
- return output;
+}
Let's move this to the earlier commit and change it to match one of the already existing similar helper in other Wine code:
```suggestion:-12+0 static WCHAR *strdupAtoW(const char *str) { WCHAR *ret = NULL; SIZE_T len;
if (!str) return ret; len = strlen(str) + 1; ret = malloc(len * sizeof(WCHAR)); if (ret) ntdll_umbstowcs(str, len, ret, len); return ret; } ```