mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
clipboard: fix unsafe warning on windows (affects v-ui)
This commit is contained in:
parent
c057b45bb1
commit
230372df09
@ -4,6 +4,7 @@ import time
|
||||
|
||||
#include <windows.h>
|
||||
#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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user