From a8776eec587aacdc4235a75167fceb3fd2704a5a Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 08:50:16 -0400 Subject: [PATCH] Fix C cli API. --- platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj | 1 + platform-independent/cli-c/cli/mpw-cli.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj b/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj index da7229a9..5865ae96 100644 --- a/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj +++ b/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj @@ -3740,6 +3740,7 @@ DAB7AE461F3D466D00C856B1 /* Test */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Test; }; DAC63274148680650075AEA5 /* Build configuration list for PBXNativeTarget "jrswizzle" */ = { isa = XCConfigurationList; diff --git a/platform-independent/cli-c/cli/mpw-cli.c b/platform-independent/cli-c/cli/mpw-cli.c index bb3f7a8a..1eb168ba 100644 --- a/platform-independent/cli-c/cli/mpw-cli.c +++ b/platform-independent/cli-c/cli/mpw-cli.c @@ -303,8 +303,9 @@ int main(int argc, char *const argv[]) { fclose( sitesFile ); // Parse file. + MPMarshallInfo *sitesInputInfo = mpw_marshall_read_info( sitesInputData ); + MPMarshallFormat sitesInputFormat = sitesFormatArg? sitesFormat: sitesInputInfo->format; MPMarshallError marshallError = { .type = MPMarshallSuccess }; - MPMarshallFormat sitesInputFormat = sitesFormatArg? sitesFormat: mpw_marshall_format_guess( sitesInputData ); user = mpw_marshall_read( sitesInputData, sitesInputFormat, masterPassword, &marshallError ); if (marshallError.type == MPMarshallErrorMasterPassword) { // Incorrect master password.