From 93915f4998a7cb30f0d899fe2ee052c91319451a Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 5 Jun 2012 03:24:19 -0700 Subject: [PATCH] fixed index out of bounds error --- parser.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.d b/parser.d index 4252fa8..07d347f 100644 --- a/parser.d +++ b/parser.d @@ -562,7 +562,7 @@ body f.attributes.insertInPlace(f.attributes.length, attributes); Variable[] vars1 = parseParameters(tokens, index); - if (tokens[index] == TokenType.LParen) + if (index < tokens.length && tokens[index] == TokenType.LParen) { f.templateParameters.insertInPlace(f.templateParameters.length, map!("a.type")(vars1));