Add termination character to flattened plugin attributes if empty.
Fixes #2450. PiperOrigin-RevId: 730521722 Change-Id: Iec3fa377c65693d782eeb766a144a1c89096d1f3
This commit is contained in:
committed by
Copybara-Service
parent
024616345d
commit
14c8dc62f0
@@ -7157,6 +7157,11 @@ void mjCPlugin::Compile(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// if there are no attributes, add a null terminator
|
||||
if (plugin->nattribute == 0) {
|
||||
flattened_attributes.push_back('\0');
|
||||
}
|
||||
|
||||
// anything left in xml_attributes at this stage is not a valid attribute
|
||||
if (!config_attribs_copy.empty()) {
|
||||
std::string error =
|
||||
|
||||
Reference in New Issue
Block a user