diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 826a401b3ec2a2a432ec3ee54a2d0777e715192e..bedc5889e916b223218196bb6cf5de5f1956e8af 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -324,7 +324,10 @@ js_printf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) if((str=JS_ValueToString(cx, argv[i]))==NULL) return(JS_FALSE); arglist[i-1]=JS_GetStringBytes(str); - } else if(JSVAL_IS_INT(argv[i]) || JSVAL_IS_BOOLEAN(argv[i])) + } + else if(JSVAL_IS_DOUBLE(argv[i])) + arglist[i-1]=(char*)(unsigned long)*JSVAL_TO_DOUBLE(argv[i]); + else if(JSVAL_IS_INT(argv[i]) || JSVAL_IS_BOOLEAN(argv[i])) arglist[i-1]=(char *)JSVAL_TO_INT(argv[i]); else arglist[i-1]=NULL;