mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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:
@@ -171,7 +171,12 @@
|
|||||||
NextToken() //skip function name
|
NextToken() //skip function name
|
||||||
if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis
|
if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis
|
||||||
return
|
return
|
||||||
|
var/loops = 0
|
||||||
for()
|
for()
|
||||||
|
loops++
|
||||||
|
if(loops>=6000)
|
||||||
|
CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;")
|
||||||
|
|
||||||
if(!curToken)
|
if(!curToken)
|
||||||
errors+=new/scriptError/EndOfFile()
|
errors+=new/scriptError/EndOfFile()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user