Add missing global fields to mjmModel.
PiperOrigin-RevId: 610415124 Change-Id: I07f284804bf73cb67703597973b50b8c00ea8deb
This commit is contained in:
committed by
Copybara-Service
parent
8679c9fc59
commit
1f2d673c7b
@@ -781,8 +781,9 @@ string mjXWriter::Write(char *error, size_t error_sz) {
|
||||
doc.InsertFirstChild(root);
|
||||
|
||||
// write comment if present
|
||||
if (!model->comment.empty()) {
|
||||
XMLComment* comment = doc.NewComment(model->comment.c_str());
|
||||
string text = mjm_getString(model->comment);
|
||||
if (!text.empty()) {
|
||||
XMLComment* comment = doc.NewComment(text.c_str());
|
||||
root->LinkEndChild(comment);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user