From 826e0d1c0ec3efb146f173fceb91dbc6bb3344ea Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Sat, 14 Sep 2024 10:42:22 +1000 Subject: [PATCH] Fix string printing control chars --- src/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/print.c b/src/print.c index 8c22be68..6949bfac 100644 --- a/src/print.c +++ b/src/print.c @@ -560,8 +560,8 @@ static void print_string_list(query *q, cell *c, pl_idx c_ctx, int running, bool SB_sprintf(q->sb, "%s", "'"); SB_strcat_and_free(q->sb, formatted(C_STR(q, h), C_STRLEN(q, h), false, false)); SB_sprintf(q->sb, "%s", "'"); - } else { - SB_sprintf(q->sb, "%s", C_STR(q, h)); + } else{ + SB_strcat_and_free(q->sb, formatted(C_STR(q, h), C_STRLEN(q, h), false, false)); } c = LIST_TAIL(c);