Skip to content
Snippets Groups Projects
Commit d5e8981d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

MsgBase.save_msg() docs says only one argument is required

So use js_argc() to report an error if there's fewer than 1 argument, but
don't just fail silently when 2 arguments are provided.
parent 7b8c4846
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4251 passed
......@@ -2566,8 +2566,8 @@ js_save_msg(JSContext *cx, uintN argc, jsval *arglist)
JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
if(argc<2)
return JS_TRUE;
if(!js_argc(cx, argc, 1))
return JS_FALSE;
if((p=(private_t*)js_GetClassPrivate(cx, obj, &js_msgbase_class))==NULL) {
return JS_FALSE;
......
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