mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-05 17:29:43 +08:00
Handle empty scripts.
This commit is contained in:
@@ -1485,5 +1485,5 @@ js_Function *jsC_compilefunction(js_State *J, js_Ast *prog)
|
||||
|
||||
js_Function *jsC_compilescript(js_State *J, js_Ast *prog, int default_strict)
|
||||
{
|
||||
return newfun(J, prog->line, NULL, NULL, prog, 1, default_strict);
|
||||
return newfun(J, prog ? prog->line : 0, NULL, NULL, prog, 1, default_strict);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user