pc: do not access out of bounds array element

This commit is contained in:
Sigrid Solveig Haflínudóttir 2022-03-28 17:23:04 +00:00
parent 89ae389eb6
commit bc5b0254d0

View file

@ -636,7 +636,7 @@ yylex(void)
yylval.sym = getsym(buf, 1);
return LSYMB;
}
if(c < 128 && (kw = optab[c], kw != nil)){
if(c >= 0 && c < 128 && (kw = optab[c], kw != nil)){
b = Bgetc(in);
for(; kw->name[0] == c; kw++)
if(kw->name[0] == b)