Fix for some infinite loop with NTSL parser.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3306 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2012-03-16 05:25:34 +00:00
parent a4f652dc06
commit 597674c671

View File

@@ -171,7 +171,12 @@
NextToken() //skip function name
if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis
return
var/loops = 0
for()
loops++
if(loops>=6000)
CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;")
if(!curToken)
errors+=new/scriptError/EndOfFile()
return