* 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:
Giacomand
2013-08-06 21:39:21 +01:00
parent 53244202be
commit 2b0ed74f55
3 changed files with 46 additions and 15 deletions
+4 -3
View File
@@ -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()