Skip to content

Commit

Permalink
Delta minor version fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 28, 2017
1 parent 21214e8 commit 67b1e08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Sparkle/SUBinaryDeltaCreate.m
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF
assert(destination);
assert(patchFile);
assert(majorVersion >= FIRST_DELTA_DIFF_MAJOR_VERSION && majorVersion <= LATEST_DELTA_DIFF_MAJOR_VERSION);
SUBinaryDeltaMinorVersion minorVersion = latestMinorVersionForMajorVersion(majorVersion);

int minorVersion = latestMinorVersionForMajorVersion(majorVersion);

NSMutableDictionary *originalTreeState = [NSMutableDictionary dictionary];

char pathBuffer[PATH_MAX] = {0};
Expand Down
4 changes: 2 additions & 2 deletions Sparkle/SUBinaryDeltaTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static BOOL runVersionCommand(NSString *programName, NSArray *args)
}

SUBinaryDeltaMajorVersion majorDiffVersion = FIRST_DELTA_DIFF_MAJOR_VERSION;
int minorDiffVersion = FIRST_DELTA_DIFF_MINOR_VERSION;
int minorDiffVersion = 0;

xar_subdoc_t subdoc;
for (subdoc = xar_subdoc_first(x); subdoc; subdoc = xar_subdoc_next(subdoc)) {
Expand All @@ -205,7 +205,7 @@ static BOOL runVersionCommand(NSString *programName, NSArray *args)
// available in version 2.0 or later
xar_subdoc_prop_get(subdoc, MINOR_DIFF_VERSION_KEY, &value);
if (value)
minorDiffVersion = (SUBinaryDeltaMinorVersion)[@(value) intValue];
minorDiffVersion = [@(value) intValue];
}
}

Expand Down

0 comments on commit 67b1e08

Please sign in to comment.