diff options
Diffstat (limited to 'source4/lib/ejs/ejs.c')
-rw-r--r-- | source4/lib/ejs/ejs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ejs/ejs.c b/source4/lib/ejs/ejs.c index 41af795370..d0eaf6e389 100644 --- a/source4/lib/ejs/ejs.c +++ b/source4/lib/ejs/ejs.c @@ -418,8 +418,10 @@ int ejsEvalScript(EjsId eid, char *script, MprVar *vp, char **emsg) endlessLoopTest = NULL; ep->exitStatus = 0; + ejsParse(ep, EJS_STATE_BEGIN, EJS_FLAGS_EXE); /* Skip over #! */ + do { - state = ejsParse(ep, EJS_STATE_BEGIN, EJS_FLAGS_EXE); + state = ejsParse(ep, EJS_STATE_STMT, EJS_FLAGS_EXE); if (state == EJS_STATE_RET) { state = EJS_STATE_EOF; |