1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

clipboard: wrap vstring call in unsafe (#6170)

This commit is contained in:
Lukas Neubert 2020-08-19 16:06:23 +02:00 committed by GitHub
parent e6e1011e47
commit 88bca9d17a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,9 @@ fn (mut cb Clipboard) start_listener(){
C.XDeleteProperty(event.xselection.display, event.xselection.requestor, event.xselection.property)
if cb.is_supported_target(prop.actual_type) {
cb.got_text = true
cb.text = byteptr(prop.data).vstring() //TODO: return byteptr to support other mimetypes
unsafe {
cb.text = byteptr(prop.data).vstring() //TODO: return byteptr to support other mimetypes
}
}
cb.mutex.unlock()
}