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

Instead of failing, set node_num to zero so the "invalid node number"

message is shown as with str_cmds.bin
parent a3c2a6cb
No related branches found
No related tags found
No related merge requests found
......@@ -1849,9 +1849,10 @@ 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);
if(JSVAL_IS_NUMBER(argv[0]))
JS_ValueToInt32(cx,argv[0],&node_num);
else
node_num=0;
sbbs->spy(node_num);
return(JS_TRUE);
......
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