Skip to content

Commit

Permalink
Fix print lists, re issue #419
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Dec 8, 2023
1 parent 5cd8c10 commit 873c3a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,15 @@ static void print_iso_list(query *q, cell *c, pl_idx c_ctx, int running, bool co
if (running) DEREF_CHECKED(any2, both, save_vgen, e, e->vgen, tail, tail_ctx, q->print_vgen);

if (both || q->cycle_error || (q->max_depth && (print_depth >= q->max_depth))) {
SB_sprintf(q->sb, "%s", "|...]");
SB_sprintf(q->sb, "%s", "|");

if ((both || q->cycle_error) && (tail_ctx == 0)) {
print_variable(q, tail, tail_ctx, running);
} else {
SB_sprintf(q->sb, "%s", "...");
}

SB_sprintf(q->sb, "%s", "]");
q->last_thing = WAS_OTHER;
q->cycle_error = true;
break;
Expand Down

1 comment on commit 873c3a4

@UWN
Copy link

@UWN UWN commented on 873c3a4 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not put any tests for this?

Please sign in to comment.