diff options
-rw-r--r-- | git.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -107,9 +107,14 @@ int parse_patch_list(void *ctx, void *ret, const keyword *key, keyword_val val) pr->patches[num_patches--] = NULL; /* For each patch file in the list. */ for (linked_list *patch = patch_list; patch != NULL; patch = patch->prev, --num_patches) { - const char *patch_file = (const char *)patch->data; + char *patch_file = create_num_str((const char *)patch->data, num_patches); + char *sanitized_patch_file = sanitize_str(patch_file); /* Create a new entry in the list. */ pr->patches[num_patches] = create_file(root, patch_file); + pr->patches[num_patches]->name = (char *)patch->data; + free(patch_file); + free(sanitized_patch_file); + } cleanup_linked_list(patch_list); |