mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
utf8_to_utf16: align with libuv
- take a size parameter - always NUL-terminate the result - return libuv error code - handle error in caller only (avoid redundant messages)53995a3825
4c945f4936
This commit is contained in:
@@ -1180,12 +1180,10 @@ char *os_resolve_shortcut(const char *fname)
|
||||
&IID_IShellLinkW, (void **)&pslw);
|
||||
if (hr == S_OK) {
|
||||
wchar_t *p;
|
||||
const int conversion_result = utf8_to_utf16(fname, &p);
|
||||
const int conversion_result = utf8_to_utf16(fname, len, &p);
|
||||
if (conversion_result != 0) {
|
||||
EMSG2("utf8_to_utf16 failed: %d", conversion_result);
|
||||
}
|
||||
|
||||
if (p != NULL) {
|
||||
} else if (p != NULL) {
|
||||
// Get a pointer to the IPersistFile interface.
|
||||
hr = pslw->lpVtbl->QueryInterface(
|
||||
pslw, &IID_IPersistFile, (void **)&ppf);
|
||||
|
Reference in New Issue
Block a user