Commit f7c1c40c authored by rswindell's avatar rswindell
Browse files

Fixed void script result conversion to integer.

parent 0a0e2a8d
......@@ -574,6 +574,7 @@ long sbbs_t::js_execfile(const char *cmd)
JSObject* js_scope=NULL;
JSScript* js_script=NULL;
jsval rval;
int32 result=0;
if(js_cx==NULL) {
errormsg(WHERE,ERR_CHK,"JavaScript support",0);
......@@ -654,7 +655,10 @@ long sbbs_t::js_execfile(const char *cmd)
JS_GC(js_cx);
return(JSVAL_TO_INT(rval));
if(rval!=JSVAL_VOID)
JS_ValueToInt32(js_cx,rval,&result);
return(result);
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment