Fixed a write to array index -1 with demo/demo -tree
This commit is contained in:
parent
985015cea1
commit
b41e36365d
@ -95,6 +95,7 @@ tree_print_dir(IsoDir *dir, int level)
|
|||||||
sp[i+1] = ' ';
|
sp[i+1] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (level > 0)
|
||||||
sp[level * 2 - 1] = '-';
|
sp[level * 2 - 1] = '-';
|
||||||
sp[level * 2] = '\0';
|
sp[level * 2] = '\0';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user