use checked access

This commit is contained in:
Green Sky 2024-12-09 22:03:47 +01:00
parent c5ee5ac3f9
commit b1becb2128
No known key found for this signature in database

View File

@ -40,7 +40,7 @@ Contact3 MessageSerializerNJ::deserlContactByID(const nlohmann::json& j) {
if (j.is_binary()) { if (j.is_binary()) {
id = j.get_binary(); id = j.get_binary();
} else { } else {
j["bytes"].get_to(id); j.at("bytes").get_to(id);
} }
Contact3 other_c = findContactByID(cr, id); Contact3 other_c = findContactByID(cr, id);
@ -73,7 +73,7 @@ ObjectHandle MessageSerializerNJ::deserlFileObjByID(const nlohmann::json& j) {
if (j.is_binary()) { if (j.is_binary()) {
id = j.get_binary(); id = j.get_binary();
} else { } else {
j["bytes"].get_to(id); j.at("bytes").get_to(id);
} }
auto o = os.getOneObjectByID(ByteSpan{id}); auto o = os.getOneObjectByID(ByteSpan{id});