mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 01:41:37 +08:00
Fix 698191: don't call pexp with NULL expression in jsdump.c
This commit is contained in:
10
jsdump.c
10
jsdump.c
@@ -519,16 +519,16 @@ static void pstm(int d, js_Ast *stm)
|
||||
|
||||
case STM_FOR:
|
||||
ps("for (");
|
||||
pexp(d, stm->a); ps("; ");
|
||||
pexp(d, stm->b); ps("; ");
|
||||
pexp(d, stm->c); ps(")");
|
||||
if (stm->a) pexp(d, stm->a); ps("; ");
|
||||
if (stm->b) pexp(d, stm->b); ps("; ");
|
||||
if (stm->c) pexp(d, stm->c); ps(")");
|
||||
pstmh(d, stm->d);
|
||||
break;
|
||||
case STM_FOR_VAR:
|
||||
ps("for (var ");
|
||||
pvarlist(d, stm->a); ps("; ");
|
||||
pexp(d, stm->b); ps("; ");
|
||||
pexp(d, stm->c); ps(")");
|
||||
if (stm->b) pexp(d, stm->b); ps("; ");
|
||||
if (stm->c) pexp(d, stm->c); ps(")");
|
||||
pstmh(d, stm->d);
|
||||
break;
|
||||
case STM_FOR_IN:
|
||||
|
||||
Reference in New Issue
Block a user