Fix SEGV from numbered parameters outside of blocks; fix #4862

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-12-21 01:21:52 +09:00
parent ef8621cb61
commit 5cc595cb2a
+1 -1
View File
@@ -5952,7 +5952,7 @@ parser_yylex(parser_state *p)
break;
case '_':
if (toklen(p) == 2 && ISDIGIT(tok(p)[1])) {
if (toklen(p) == 2 && ISDIGIT(tok(p)[1]) && p->nvars) {
int n = tok(p)[1] - '0';
node *nvars = p->nvars->car;