From 6f5bb02b923c1402eba04ce78033317da401971e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 6 May 2023 13:43:32 -0400 Subject: Use tagged union style for extra safety and concision --- json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json.c') diff --git a/json.c b/json.c index 17533ca..71ada3b 100644 --- a/json.c +++ b/json.c @@ -28,7 +28,7 @@ static int _json_match(const char *text, match_t *m, int comma, bool verbose) comma = 0; printf("{"); if (m->pat->type == BP_TAGGED) { - printf("\"tag\":\"%.*s\"", (int)m->pat->args.capture.namelen, m->pat->args.capture.name); + printf("\"tag\":\"%.*s\"", (int)Match(m->pat, BP_TAGGED)->namelen, Match(m->pat, BP_TAGGED)->name); comma = 1; } if (verbose) { -- cgit v1.2.3