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

file_cfgname() would do weird things if you passed only a single parameter.

parent 449c0af2
No related branches found
No related tags found
No related merge requests found
...@@ -2841,7 +2841,7 @@ js_cfgfname(JSContext *cx, uintN argc, jsval *arglist) ...@@ -2841,7 +2841,7 @@ js_cfgfname(JSContext *cx, uintN argc, jsval *arglist)
JS_SET_RVAL(cx, arglist, JSVAL_VOID); JS_SET_RVAL(cx, arglist, JSVAL_VOID);
if(argc==0 || JSVAL_IS_VOID(argv[0])) if(argc < 2 || JSVAL_IS_VOID(argv[0]))
return(JS_TRUE); return(JS_TRUE);
JSVALUE_TO_MSTRING(cx, argv[0], path, NULL); JSVALUE_TO_MSTRING(cx, argv[0], path, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment