From 88bca9d17ae0c88612395dfef13d37332d4f0507 Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Wed, 19 Aug 2020 16:06:23 +0200 Subject: [PATCH] clipboard: wrap vstring call in unsafe (#6170) --- vlib/clipboard/clipboard_linux.c.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/clipboard/clipboard_linux.c.v b/vlib/clipboard/clipboard_linux.c.v index 2207a7989f..71320786a8 100644 --- a/vlib/clipboard/clipboard_linux.c.v +++ b/vlib/clipboard/clipboard_linux.c.v @@ -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() }