From 194c626aed6d10a1c03a2f19f508434ef35671c2 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Thu, 24 Oct 2019 11:40:58 -0400 Subject: [PATCH] Sync internals for marshalling with documentation. --- platform-independent/c/core/src/mpw-algorithm.c | 2 +- platform-independent/c/core/src/mpw-marshal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform-independent/c/core/src/mpw-algorithm.c b/platform-independent/c/core/src/mpw-algorithm.c index 2e4f1804..794276ee 100644 --- a/platform-independent/c/core/src/mpw-algorithm.c +++ b/platform-independent/c/core/src/mpw-algorithm.c @@ -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 ); diff --git a/platform-independent/c/core/src/mpw-marshal.c b/platform-independent/c/core/src/mpw-marshal.c index d51a091f..7e818cb3 100644 --- a/platform-independent/c/core/src/mpw-marshal.c +++ b/platform-independent/c/core/src/mpw-marshal.c @@ -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 );