Skip to content
Snippets Groups Projects
Commit 5b642e82 authored by rswindell's avatar rswindell
Browse files

Restore JS auto-terminate state after js_execfile().

parent b557931d
No related branches found
No related tags found
No related merge requests found
......@@ -568,6 +568,7 @@ long sbbs_t::js_execfile(const char *cmd)
JSScript* js_script=NULL;
jsval rval;
int32 result=0;
BOOL auto_terminate = js_branch.auto_terminate;
if(js_cx==NULL) {
errormsg(WHERE,ERR_CHK,"JavaScript support",0);
......@@ -659,6 +660,9 @@ long sbbs_t::js_execfile(const char *cmd)
if(rval!=JSVAL_VOID)
JS_ValueToInt32(js_cx,rval,&result);
JS_ENDREQUEST(js_cx);
// Restore saved auto_terminate state
js_branch.auto_terminate = auto_terminate;
return(result);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment