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
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment