From edaeaadf990aa933574e0c534f2315fe3a965426 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Tue, 13 Dec 2016 00:17:02 +0800 Subject: [PATCH] Fixes #1042 --- runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Recognizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Recognizer.cs b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Recognizer.cs index b5cf592b0..cc6a7aba1 100644 --- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Recognizer.cs +++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Recognizer.cs @@ -85,7 +85,7 @@ namespace Antlr4.Runtime protected virtual IDictionary CreateTokenTypeMap(IVocabulary vocabulary) { var result = new Dictionary(); - for (int i = 0; i < Atn.maxTokenType; i++) + for (int i = 0; i <= Atn.maxTokenType; i++) { string literalName = vocabulary.GetLiteralName(i); if (literalName != null)