clipboard: fix `to_wide()` in clipboard_windows.c.v (#7768)
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