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

User statistics properties now support values > 30 bits (converted to doubles).

parent 772399f9
Branches
Tags
Loading
......@@ -336,9 +336,12 @@ static JSBool js_user_get(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
if((js_str=JS_NewStringCopyZ(cx, s))==NULL)
return(JS_FALSE);
*vp = STRING_TO_JSVAL(js_str);
} else
} else {
if(INT_FITS_IN_JSVAL(val) && !(val&0x80000000))
*vp = INT_TO_JSVAL(val);
else
JS_NewDoubleValue(cx, val, vp);
}
return(JS_TRUE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment