mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
Fix predict_next() in parser (again).
Reported by Sergey Bronnikov. #1054
This commit is contained in:
parent
d0ce82ecdc
commit
309fb42b87
@ -2527,9 +2527,11 @@ static void parse_for_num(LexState *ls, GCstr *varname, BCLine line)
|
|||||||
*/
|
*/
|
||||||
static int predict_next(LexState *ls, FuncState *fs, BCPos pc)
|
static int predict_next(LexState *ls, FuncState *fs, BCPos pc)
|
||||||
{
|
{
|
||||||
BCIns ins = fs->bcbase[pc].ins;
|
BCIns ins;
|
||||||
GCstr *name;
|
GCstr *name;
|
||||||
cTValue *o;
|
cTValue *o;
|
||||||
|
if (pc >= fs->bclim) return 0;
|
||||||
|
ins = fs->bcbase[pc].ins;
|
||||||
switch (bc_op(ins)) {
|
switch (bc_op(ins)) {
|
||||||
case BC_MOV:
|
case BC_MOV:
|
||||||
if (bc_d(ins) >= fs->nactvar) return 0;
|
if (bc_d(ins) >= fs->nactvar) return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user