2
0

Sync internals for marshalling with documentation.

This commit is contained in:
Maarten Billemont 2019-10-24 11:40:58 -04:00
parent 344cce084f
commit 194c626aed
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ const MPIdenticon mpw_identicon(const char *fullName, const char *masterPassword
.body = mpw_identicon_bodies[seed[1] % (sizeof( mpw_identicon_bodies ) / sizeof( *mpw_identicon_bodies ))],
.rightArm = mpw_identicon_rightArms[seed[2] % (sizeof( mpw_identicon_rightArms ) / sizeof( *mpw_identicon_rightArms ))],
.accessory = mpw_identicon_accessories[seed[3] % (sizeof( mpw_identicon_accessories ) / sizeof( *mpw_identicon_accessories ))],
.color = (uint8_t)(seed[4] % (MPIdenticonColorLast - MPIdenticonColorFirst + 1) + MPIdenticonColorFirst),
.color = (MPIdenticonColor)(seed[4] % (MPIdenticonColorLast - MPIdenticonColorFirst + 1) + MPIdenticonColorFirst),
};
mpw_free( &seed, 32 );

View File

@ -658,11 +658,11 @@ const char *mpw_marshal_write(
// Section: "export"
MPMarshalledData *data_export = mpw_marshal_data_get( data, "export", NULL );
mpw_marshal_data_set_bool( user->redacted, data_export, "redacted", NULL );
char dateString[21];
time_t now = time( NULL );
if (strftime( dateString, sizeof( dateString ), "%FT%TZ", gmtime( &now ) ))
mpw_marshal_data_set_str( dateString, data_export, "date", NULL );
mpw_marshal_data_set_bool( user->redacted, data_export, "redacted", NULL );
// Section: "user"
MPMarshalledData *data_user = mpw_marshal_data_get( data, "user", NULL );