From 82d03b32f27e6612a5b551f6aeeef8322df70520 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 19 May 2025 23:15:27 +0900 Subject: [PATCH] codedump.c: skip string body if it's empty --- src/codedump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/codedump.c b/src/codedump.c index 34f802fe2..310c53a7d 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -505,7 +505,10 @@ codedump(mrb_state *mrb, const mrb_irep *irep, FILE *out) break; CASE(OP_STRING, BB): mrb_assert((irep->pool[b].tt&IREP_TT_NFLAG)==0); - fprintf(out, "STRING\tR%d\tL[%d]\t; %s", a, b, irep->pool[b].u.str); + fprintf(out, "STRING\tR%d\tL[%d]\t", a, b); + if (irep->pool[b].u.str[0]) { + fprintf(out, "; %s", irep->pool[b].u.str); + } print_lv_a(mrb, irep, a, out); break; CASE(OP_STRCAT, B):