Skip to content

Commit

Permalink
dont set body twice if struct named twice
Browse files Browse the repository at this point in the history
  • Loading branch information
2over12 committed Feb 28, 2024
1 parent 486a80a commit 8a586f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Protobuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,9 @@ Result<std::monostate, std::string> ProtobufTranslator::DecodeTypeMap(

std::string name = names.at(k);
auto res = getOrCreateNamedStruct(this->context, name);
res->setBody(sty->elements());
if (res->isOpaque()) {
res->setBody(sty->elements());
}
}
type_names[k] = names.at(k);
} else {
Expand Down

0 comments on commit 8a586f7

Please sign in to comment.