avoid crash in addLitExpression()

fixes github issue #205
This commit is contained in:
Hong, Yang A 2020-04-14 09:36:46 +00:00
parent 934473f406
commit 8344395bfd

View File

@ -402,7 +402,7 @@ void addLitExpression(NG &ng, unsigned index, const char *expression,
}
// Ensure that our pattern isn't too long (in characters).
if (strlen(expression) > cc.grey.limitPatternLength) {
if (expLength > cc.grey.limitPatternLength) {
throw CompileError("Pattern length exceeds limit.");
}