mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
clipboard: fix to_wide()
in clipboard_windows.c.v (#7768)
This commit is contained in:
parent
bf7da14ba1
commit
b6136f9f8f
@ -125,7 +125,7 @@ fn (mut cb Clipboard) free() {
|
||||
}
|
||||
|
||||
// the string.to_wide doesn't work with SetClipboardData, don't know why
|
||||
fn to_wide(text string) &C.HGLOBAL {
|
||||
fn to_wide(text string) C.HGLOBAL {
|
||||
len_required := C.MultiByteToWideChar(C.CP_UTF8, C.MB_ERR_INVALID_CHARS, text.str,
|
||||
text.len + 1, C.NULL, 0)
|
||||
buf := C.GlobalAlloc(C.GMEM_MOVEABLE, i64(sizeof(u16)) * len_required)
|
||||
|
Loading…
Reference in New Issue
Block a user