forked from cory/tildefriends
Fixed a time int overflow issue on raspberry pi.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3752 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
9d105bdc1a
commit
53aac8d23a
@ -1135,8 +1135,8 @@ void tf_ssb_append_message(tf_ssb_t* ssb, JSValue message)
|
|||||||
JS_SetPropertyStr(context, root, "author", authorstr);
|
JS_SetPropertyStr(context, root, "author", authorstr);
|
||||||
JS_SetPropertyStr(context, root, "sequence", JS_NewInt64(context, previous_sequence + 1));
|
JS_SetPropertyStr(context, root, "sequence", JS_NewInt64(context, previous_sequence + 1));
|
||||||
|
|
||||||
time_t now = time(NULL);
|
int64_t now = (int64_t)time(NULL);
|
||||||
JS_SetPropertyStr(context, root, "timestamp", JS_NewInt64(context, now * 1000));
|
JS_SetPropertyStr(context, root, "timestamp", JS_NewInt64(context, now * 1000LL));
|
||||||
JSValue hashstr = JS_NewString(context, "sha256");
|
JSValue hashstr = JS_NewString(context, "sha256");
|
||||||
JS_SetPropertyStr(context, root, "hash", hashstr);
|
JS_SetPropertyStr(context, root, "hash", hashstr);
|
||||||
JSValue content = JS_DupValue(context, message);
|
JSValue content = JS_DupValue(context, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user