summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2022-07-17 19:39:19 +0300
committerMantas Mikulėnas <grawity@gmail.com>2022-07-17 19:39:19 +0300
commit82141a716a80a3206dfa1bb17f8b4335aa10620c (patch)
tree246bd39ffd1be790f1cd2f759e8eeb9da9d262a4
parent2a2fd5afb5f9eba93fde2e7cedb949ab50baf8fb (diff)
fix warnings
-rwxr-xr-xtreeify4
1 files changed, 4 insertions, 0 deletions
diff --git a/treeify b/treeify
index 9fc10b7..d69e97e 100755
--- a/treeify
+++ b/treeify
@@ -162,6 +162,8 @@ sub show {
# from the branch, rather than from the name), even the
# root has a branch, therefore needs padding.
$graph->[$depth] = ($GRAPH{i_br} x $branch_pad);
+ } else {
+ $graph->[$depth] = "";
}
my $tree_str = join(" " x $sub_indent, @$graph);
@@ -173,6 +175,8 @@ sub show {
$graph->[$depth] = (@keys ? $GRAPH{s_mid} : $GRAPH{s_end}).($GRAPH{s_br} x $branch_pad);
} elsif ($sideways) {
$graph->[$depth] = ($GRAPH{s_br} x $branch_pad);
+ } else {
+ $graph->[$depth] = "";
}
my $line_str;