]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix segfault in editing numbers in count command of restore tree.
authorKern Sibbald <kern@sibbald.com>
Fri, 8 Oct 2004 18:50:30 +0000 (18:50 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 8 Oct 2004 18:50:30 +0000 (18:50 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1638 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_tree.c

index da926e1fcda370e8c187723c321cab164a37986d..13c678184745e1708a1da01acd51d82a7cc61c2c 100644 (file)
@@ -345,7 +345,7 @@ static int markdircmd(UAContext *ua, TREE_CTX *tree)
 static int countcmd(UAContext *ua, TREE_CTX *tree)
 {
    int total, num_extract;
-   char ec1[50];
+   char ec1[50], ec2[50];
 
    total = num_extract = 0;
    for (TREE_NODE *node=first_tree_node(tree->root); node; node=next_tree_node(node)) {
@@ -356,8 +356,9 @@ static int countcmd(UAContext *ua, TREE_CTX *tree)
         }
       }
    }
-   bsendmsg(ua, "%s total files/dirs. %d marked to be restored.\n", total, 
-           edit_uint64_with_commas(num_extract, ec1));
+   bsendmsg(ua, "%s total files/dirs. %s marked to be restored.\n", 
+           edit_uint64_with_commas(total, ec1), 
+           edit_uint64_with_commas(num_extract, ec2));
    return 1;
 }