Update aiserver.py

Crash fix
This commit is contained in:
henk717 2021-12-24 19:57:08 +01:00
parent 726b42889b
commit 6952938e88
1 changed files with 1 additions and 1 deletions

View File

@ -1977,7 +1977,7 @@ def loadsettings():
else:
vars.corescript = "default.lua"
if(vars.allowsp and "softprompt" in js and type(js["softprompt"]) is str and all(q not in js["softprompt"] for q in ("..", ":")) and all(js["softprompt"][0] not in q for q in ("/", "\\"))):
if(vars.allowsp and "softprompt" in js and type(js["softprompt"]) is str and all(q not in js["softprompt"] for q in ("..", ":")) and (len(js["softprompt"]) == 0 or all(js["softprompt"][0] not in q for q in ("/", "\\")))):
spRequest(js["softprompt"])
else:
vars.spfilename = ""