clipboard: wrap vstring call in unsafe (#6170)

pull/6175/head
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
1 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,9 @@ fn (mut cb Clipboard) start_listener(){
C.XDeleteProperty(event.xselection.display, event.xselection.requestor, event.xselection.property) C.XDeleteProperty(event.xselection.display, event.xselection.requestor, event.xselection.property)
if cb.is_supported_target(prop.actual_type) { if cb.is_supported_target(prop.actual_type) {
cb.got_text = true 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() cb.mutex.unlock()
} }