ref: ce02a9d72953bf65c357d0fcd62cb2d1cfb49808
parent: cb1d50bca4a45057be56bc51856088effd6c316e
author: Tor Andersson <[email protected]>
date: Fri Mar 8 05:56:52 EST 2019
Handle empty scripts.
--- a/jscompile.c
+++ b/jscompile.c
@@ -1485,5 +1485,5 @@
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);
}