Commit d8b66f2d authored by rswindell's avatar rswindell
Browse files

Using JSVAL_IS_NUMBER() instead of JSVAL_IS_INT() to support full 32-bit

property values.
parent 04e48a0f
......@@ -601,7 +601,7 @@ static JSBool js_bbs_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
tiny = JSVAL_TO_INT(id);
if(JSVAL_IS_INT(*vp) || JSVAL_IS_BOOLEAN(*vp))
if(JSVAL_IS_NUMBER(*vp) || JSVAL_IS_BOOLEAN(*vp))
JS_ValueToInt32(cx, *vp, &val);
else if(JSVAL_IS_STRING(*vp)) {
if((js_str = JS_ValueToString(cx, *vp))==NULL)
......
......@@ -153,7 +153,7 @@ static JSBool js_console_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
tiny = JSVAL_TO_INT(id);
if(JSVAL_IS_INT(*vp) || JSVAL_IS_BOOLEAN(*vp))
if(JSVAL_IS_NUMBER(*vp) || JSVAL_IS_BOOLEAN(*vp))
JS_ValueToInt32(cx, *vp, &val);
switch(tiny) {
......@@ -743,7 +743,7 @@ js_printfile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if (!str)
return(JS_FALSE);
if(argc>1 && JSVAL_IS_INT(argv[1]))
if(argc>1 && JSVAL_IS_NUMBER(argv[1]))
JS_ValueToInt32(cx,argv[1],(int32*)&mode);
sbbs->printfile(JS_GetStringBytes(str),mode);
......
......@@ -1521,7 +1521,7 @@ static JSBool js_node_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
if(getnodedat(cfg, node_num, &node, &file))
return(JS_TRUE);
if(JSVAL_IS_INT(*vp))
if(JSVAL_IS_NUMBER(*vp))
JS_ValueToInt32(cx, *vp, &val);
tiny = JSVAL_TO_INT(id);
......
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