From e6305817b668447fa434f26bde1e15921de4fba1 Mon Sep 17 00:00:00 2001 From: Kouli Date: Mon, 12 Jan 2026 18:48:38 +0100 Subject: [PATCH] Quote device's IP to get a valid JSON literal --- src/the_dude_to_human/database/dude_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/the_dude_to_human/database/dude_types.h b/src/the_dude_to_human/database/dude_types.h index e272de7..4f825dc 100644 --- a/src/the_dude_to_human/database/dude_types.h +++ b/src/the_dude_to_human/database/dude_types.h @@ -173,7 +173,7 @@ struct IpArrayField : IntArrayField { for (u32 entry : data) { IpAddress ip{}; memcpy(&ip, &entry, sizeof(u32)); - array += fmt::format("{}.{}.{}.{},", ip[0], ip[1], ip[2], ip[3]); + array += fmt::format("\"{}.{}.{}.{}\",", ip[0], ip[1], ip[2], ip[3]); } if (!data.empty()) { array.pop_back();