diff --git a/vlib/clipboard/clipboard_windows.c.v b/vlib/clipboard/clipboard_windows.c.v index 9c4560762e..f0880a298c 100644 --- a/vlib/clipboard/clipboard_windows.c.v +++ b/vlib/clipboard/clipboard_windows.c.v @@ -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)