mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
* Removed the ability to use functions inside parameters, to prevent recursion crashes.
* Added an error message for it. * Added some other crash preventing measures.
This commit is contained in:
@@ -174,8 +174,9 @@
|
||||
var/loops = 0
|
||||
for()
|
||||
loops++
|
||||
if(loops>=6000)
|
||||
CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;")
|
||||
if(loops>=800)
|
||||
errors +=new/scriptError("Cannot find ending params.")
|
||||
return
|
||||
|
||||
if(!curToken)
|
||||
errors+=new/scriptError/EndOfFile()
|
||||
@@ -184,6 +185,6 @@
|
||||
curBlock.statements+=stmt
|
||||
NextToken() //Skip close parenthesis
|
||||
return
|
||||
var/node/expression/P=ParseParamExpression()
|
||||
var/node/expression/P=ParseParamExpression(check_functions = 1)
|
||||
stmt.parameters+=P
|
||||
if(istype(curToken, /token/symbol) && curToken.value==",") NextToken()
|
||||
Reference in New Issue
Block a user