Skip to content

Commit

Permalink
Fix build tool version output.
Browse files Browse the repository at this point in the history
  • Loading branch information
nygard committed Mar 15, 2019
1 parent 45b7e01 commit 0405b68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/CDLCBuildVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
static NSString *NSStringFromBuildVersionToolNotATuple(uint64_t tuple)
{
uint32_t tool = tuple >> 32;
uint32_t version = tool & 0xffffffff;
return [NSString stringWithFormat:@"%@ %u", NSStringFromBuildVersionTool(tool), version];
uint32_t version = tuple & 0xffffffff;
return [NSString stringWithFormat:@"%@ %u.%u.%u", NSStringFromBuildVersionTool(tool),
version >> 16,
(version >> 8) & 0xff,
version & 0xff];
}

@implementation CDLCBuildVersion
Expand Down Expand Up @@ -99,7 +102,7 @@ - (NSArray *)toolStrings;
NSMutableArray *tools = [NSMutableArray array];
// iso map
for (NSNumber *tuple in _tools) {
[tools addObject:NSStringFromBuildVersionToolNotATuple([tuple unsignedLongValue])];
[tools addObject:NSStringFromBuildVersionToolNotATuple([tuple unsignedLongLongValue])];
}

return [tools copy];
Expand Down

0 comments on commit 0405b68

Please sign in to comment.