Skip to content

Commit

Permalink
Merge pull request #208 from mariux/fixes
Browse files Browse the repository at this point in the history
beeversion: Fix output of %X[ex] when X is not dash or underscore
  • Loading branch information
mariux authored and GitHub committed Aug 24, 2016
2 parents 909fd52 + be20391 commit a533cfd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/bee_version_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
if(*p == 'A' && *(v->arch))
printf(".%s", v->arch);
break;
}
if (*p) {
switch(*(p+1)) {
case '-':
case '_':
switch(*(p+1)) {
case 'x':
if (*(v->subname))
printf("%c%s", *p, v->subname);
Expand All @@ -149,7 +149,10 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
printf("%c%s", *p, v->extraversion);
p++;
continue;
}
}
default:
printf("%%%c", *p);
break;
}
continue;
} /* if '%' */
Expand All @@ -168,6 +171,9 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
case 'E':
cut_and_print(v->extraversion, '_', 1);
break;
default:
printf("@%c", *p);
break;
}
continue;
} /* if '@' */
Expand All @@ -194,4 +200,3 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)

} /* for *p */
}

0 comments on commit a533cfd

Please sign in to comment.