Crash when using scan on an empty plot
Closed this issue · 1 comments
Amp63 commented
Describe the bug
If you try to use the scan feature from the API on a plot with no templates, the game crashes.
To Reproduce
- Go to an empty plot on DF
- Run the 'scan' command through the api, I used the following script:
import websocket
ws = websocket.WebSocket()
ws.connect('ws://localhost:31375')
ws.recv() # auth
ws.send('scan')
ws.recv() # received templates (should be nothing)
ws.close()
Expected behavior
The response is an empty string or some other indicator that no templates were found.
Screenshots
Here's the crash report:
https://bytebin.lucko.me/bH1lOkgVdQ
Checks
Please check all these for more infomation with the bug.
- I am using the latest version.
- I have tried disabling various options to see if they cause the issue, such as new ones or ones I have recently enabled.
GeorgeRNG commented
A little late to commit this fix, it should now just respond with empty
. (fixed in this commit)