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

Fix handling of putenv() called without an argument.

(Doesn't solve the testbuild issue though)
parent 0af06cf5
Branches
Tags
No related merge requests found
......@@ -598,9 +598,10 @@ js_putenv(JSContext *cx, uintN argc, jsval *arglist)
{
JSObject *obj=JS_THIS_OBJECT(cx, arglist);
jsval *argv=JS_ARGV(cx, arglist);
char* p;
char* p=NULL;
JSVALUE_TO_STRING(cx, argv[0], p, NULL);
if(argc)
JSVALUE_TO_STRING(cx, argv[0], p, NULL);
if(p==NULL) {
JS_SET_RVAL(cx, arglist, INT_TO_JSVAL(-1));
return(JS_TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment