Skip to content
Snippets Groups Projects
Commit a3c2a6cb authored by deuce's avatar deuce
Browse files

Make bbs.spy fail if the argument is not a number.

Currently, when using str_cmds.js the command ``;spy die'' crashes the BBS.
parent 102b1fc0
No related branches found
No related tags found
No related merge requests found
......@@ -1849,6 +1849,8 @@ js_spy(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if((sbbs=(sbbs_t*)JS_GetContextPrivate(cx))==NULL)
return(JS_FALSE);
if(!JSVAL_IS_NUMBER(argv[0]))
return(JS_FALSE);
JS_ValueToInt32(cx,argv[0],&node_num);
sbbs->spy(node_num);
......
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