Skip to content
Snippets Groups Projects
Commit 1c1dbf2f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix system.datestr(0) returning garbage

Actually use the return value of datestr()

Fixes issue reported by Deuce, regression introduced in commit 490e86fa
parent 6433049e
No related branches found
No related tags found
No related merge requests found
Pipeline #7764 failed
......@@ -1293,8 +1293,7 @@ js_datestr(JSContext *cx, uintN argc, jsval *arglist)
}
JS_ValueToECMAUint32(cx,argv[0],(uint32_t*)&t);
}
datestr(sys->cfg,t,str);
if((js_str = JS_NewStringCopyZ(cx, str))==NULL)
if((js_str = JS_NewStringCopyZ(cx, datestr(sys->cfg, t, str))==NULL)
return(JS_FALSE);
JS_SET_RVAL(cx, arglist, STRING_TO_JSVAL(js_str));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment