copy_resource_to_swm(): Move strcat() to sprintf()
authorEric Biggers <ebiggers3@gmail.com>
Sun, 28 Oct 2012 06:10:36 +0000 (01:10 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 28 Oct 2012 06:10:36 +0000 (01:10 -0500)
src/split.c

index f38c332ada5d25b1e882de6272195f18e820bf57..2d96deb2eeec84df4679bb7b6af2688a8b797ac5 100644 (file)
@@ -100,9 +100,8 @@ static int copy_resource_to_swm(struct lookup_table_entry *lte, void *__args)
                args->lte_chain_tail = NULL;
                args->lte_chain_head = NULL;
 
-               sprintf(args->swm_base_name + args->swm_base_name_len, "%d",
-                       ++args->part_number);
-               strcat(args->swm_base_name, args->swm_suffix);
+               sprintf(args->swm_base_name + args->swm_base_name_len, "%d%s",
+                       ++args->part_number, args->swm_suffix);
 
                w->hdr.part_number = args->part_number;