fixed index out of bounds error

This commit is contained in:
Hackerpilot 2012-06-05 03:24:19 -07:00
parent 570f69f64e
commit 93915f4998
1 changed files with 1 additions and 1 deletions

View File

@ -562,7 +562,7 @@ body
f.attributes.insertInPlace(f.attributes.length, attributes); f.attributes.insertInPlace(f.attributes.length, attributes);
Variable[] vars1 = parseParameters(tokens, index); Variable[] vars1 = parseParameters(tokens, index);
if (tokens[index] == TokenType.LParen) if (index < tokens.length && tokens[index] == TokenType.LParen)
{ {
f.templateParameters.insertInPlace(f.templateParameters.length, f.templateParameters.insertInPlace(f.templateParameters.length,
map!("a.type")(vars1)); map!("a.type")(vars1));