Skip to content
Snippets Groups Projects
Commit 7eb595f6 authored by rswindell's avatar rswindell
Browse files

Bugfix: Using JS_NewNumberValue to support >30-bit time values.

parent ec6e4ff1
Branches
Tags
No related merge requests found
...@@ -585,7 +585,7 @@ BOOL js_add_file(JSContext* js_cx, JSObject* array, ...@@ -585,7 +585,7 @@ BOOL js_add_file(JSContext* js_cx, JSObject* array,
if(!JS_SetProperty(js_cx, file, "credits", &val)) if(!JS_SetProperty(js_cx, file, "credits", &val))
return(FALSE); return(FALSE);
val=INT_TO_JSVAL(time); JS_NewNumberValue(js_cx,time,&val);
if(!JS_SetProperty(js_cx, file, "time", &val)) if(!JS_SetProperty(js_cx, file, "time", &val))
return(FALSE); return(FALSE);
......
...@@ -1719,7 +1719,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent ...@@ -1719,7 +1719,7 @@ JSObject* DLLCALL js_CreateSystemObject(JSContext* cx, JSObject* parent
/***********************/ /***********************/
val = INT_TO_JSVAL(uptime); JS_NewNumberValue(cx,uptime,&val);
if(!JS_SetProperty(cx, sysobj, "uptime", &val)) if(!JS_SetProperty(cx, sysobj, "uptime", &val))
return(NULL); return(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment