Fix crash in print_tree()
This commit is contained in:
parent
1c2db8ad6b
commit
1ede1ed686
3
ell.c
3
ell.c
|
@ -416,7 +416,8 @@ print_tree (struct item *tree, int level) {
|
||||||
printf ("%*s", level, "");
|
printf ("%*s", level, "");
|
||||||
if (iter->type == ITEM_STRING) {
|
if (iter->type == ITEM_STRING) {
|
||||||
print_string (iter->value);
|
print_string (iter->value);
|
||||||
} else if (iter->head->type == ITEM_STRING
|
} else if (iter->head
|
||||||
|
&& iter->head->type == ITEM_STRING
|
||||||
&& !strcmp (iter->head->value, "list")) {
|
&& !strcmp (iter->head->value, "list")) {
|
||||||
printf ("[");
|
printf ("[");
|
||||||
print_tree (iter->head->next, level + 1);
|
print_tree (iter->head->next, level + 1);
|
||||||
|
|
Loading…
Reference in New Issue