fix clipboard out of bounds

This commit is contained in:
Nitwel 2023-11-21 11:53:13 +01:00
parent 0c33b4ab1b
commit 9e968f3dcc

View File

@ -27,7 +27,7 @@ func _init(type: ADAPTER_TYPES):
var clipboard := DisplayServer.clipboard_get()
if clipboard != null:
if clipboard != null && clipboard.find(" ") != -1:
var clip_url = clipboard.split(" ")[0]
var clip_token = clipboard.split(" ")[1]
adapter = adapters[type].new(clip_url, clip_token)