From 218ae7360858163826c53c0bce73e13c8bb131b3 Mon Sep 17 00:00:00 2001 From: Mike Lischke Date: Wed, 21 Dec 2016 10:36:46 +0100 Subject: [PATCH] Make return states the same size as the parent array. Both arrays have always the same size and after reducing common parents in a prediction context optimization we also have to update the states array. --- runtime/Cpp/runtime/src/atn/PredictionContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/Cpp/runtime/src/atn/PredictionContext.cpp b/runtime/Cpp/runtime/src/atn/PredictionContext.cpp index 9bee78451..86639d289 100755 --- a/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +++ b/runtime/Cpp/runtime/src/atn/PredictionContext.cpp @@ -350,8 +350,10 @@ Ref PredictionContext::mergeArrays(const Ref(mergedParents, mergedReturnStates); + } if (mergeCache != nullptr) { mergeCache->put(a, b, M);