diff options
-rw-r--r-- | git.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -400,14 +400,14 @@ int get_patch_list(void *ctx, void *data, const keyword *key, keyword_val *val) char *tmp; for (int i = 0; pr->patches[i] != NULL; i++) { - len += format_len("% *s", !i, pr->patches[i]->name); + len += format_len("% *s", (int)strlen(pr->patches[i]->name)+(i > 0), pr->patches[i]->name); } val->str = calloc(len+1, sizeof(char)); tmp = val->str; for (int i = 0; pr->patches[i] != NULL; i++) { - tmp += sprintf(tmp, "%*s", !i, pr->patches[i]->name); + tmp += sprintf(tmp, "%*s", (int)strlen(pr->patches[i]->name)+(i > 0), pr->patches[i]->name); } return 2; } else { |