diff --git a/vlib/clipboard/clipboard_windows.c.v b/vlib/clipboard/clipboard_windows.c.v index b147024ab2..6e06e00df5 100644 --- a/vlib/clipboard/clipboard_windows.c.v +++ b/vlib/clipboard/clipboard_windows.c.v @@ -4,6 +4,7 @@ import time #include #flag -lUser32 + struct WndClassEx { cb_size u32 style u32 @@ -173,7 +174,7 @@ fn (mut cb Clipboard) get_text() string { C.CloseClipboard() return '' } - str := string_from_wide(&u16(C.GlobalLock(h_data))) + str := unsafe { string_from_wide(&u16(C.GlobalLock(h_data))) } C.GlobalUnlock(h_data) return str }