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

Fixed File.writeAll() method: setting and checking for wrong return value from

js_writeline() - JSVAL_TRUE instead of JS_TRUE.
parent f6323832
No related branches found
No related tags found
No related merge requests found
......@@ -478,13 +478,13 @@ js_writeall(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JS_GetArrayLength(cx, array, &limit);
*rval = BOOLEAN_TO_JSVAL(JSVAL_TRUE);
*rval = BOOLEAN_TO_JSVAL(JS_TRUE);
for(i=0;i<limit;i++) {
if(!JS_GetElement(cx, array, i, &elemval))
break;
js_writeln(cx, obj, 1, &elemval, rval);
if(*rval!=BOOLEAN_TO_JSVAL(JSVAL_TRUE))
if(*rval!=BOOLEAN_TO_JSVAL(JS_TRUE))
break;
}
......
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