From b1becb2128224fe63b7dff2218ecc66e9b92bc5b Mon Sep 17 00:00:00 2001 From: Green Sky Date: Mon, 9 Dec 2024 22:03:47 +0100 Subject: [PATCH] use checked access --- src/solanaceae/message3/message_serializer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solanaceae/message3/message_serializer.cpp b/src/solanaceae/message3/message_serializer.cpp index f404f15..e2a7d89 100644 --- a/src/solanaceae/message3/message_serializer.cpp +++ b/src/solanaceae/message3/message_serializer.cpp @@ -40,7 +40,7 @@ Contact3 MessageSerializerNJ::deserlContactByID(const nlohmann::json& j) { if (j.is_binary()) { id = j.get_binary(); } else { - j["bytes"].get_to(id); + j.at("bytes").get_to(id); } Contact3 other_c = findContactByID(cr, id); @@ -73,7 +73,7 @@ ObjectHandle MessageSerializerNJ::deserlFileObjByID(const nlohmann::json& j) { if (j.is_binary()) { id = j.get_binary(); } else { - j["bytes"].get_to(id); + j.at("bytes").get_to(id); } auto o = os.getOneObjectByID(ByteSpan{id});