The following call of CF_GetClipboard causes problems in Reaper:
A,B = reaper.CF_GetClipboard("",20000000000000)
This either crashes Reaper completely or freezes the Lua-instance of the script. Means, if I try to run the script, it will not run until I restart Reaper.
Maybe some sanity checks would be a good idea.
The text was updated successfully, but these errors were encountered:
There's a check but it only guards against large positive numbers. 20000000000000, as a signed 32-bit integer, is -1662697472 which slips right through it. Thanks, fixing!
It turns out it's the change that allowed omitting the buf/buf_sz parameters that is letting this happen (the buffer fails to be resized to fit the clipboard data).
The following call of CF_GetClipboard causes problems in Reaper:
A,B = reaper.CF_GetClipboard("",20000000000000)
This either crashes Reaper completely or freezes the Lua-instance of the script. Means, if I try to run the script, it will not run until I restart Reaper.
Maybe some sanity checks would be a good idea.
The text was updated successfully, but these errors were encountered: