Avoid dynamically generated strings from being used as format strings in mjCError and mjXError.

PiperOrigin-RevId: 597198372
Change-Id: I2f159436091c03c7454545877cd5f7e2383cd7c8
This commit is contained in:
Nimrod Gileadi
2024-01-10 03:19:47 -08:00
committed by Copybara-Service
parent 8247ddea0b
commit 371da98d97
3 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -4732,6 +4732,6 @@ void mjCPlugin::Compile(void) {
std::string error =
"unrecognized attribute 'plugin:" + config_attribs.begin()->first +
"' for plugin " + std::string(plugin->name) + "'";
throw mjCError(parent, error.c_str());
throw mjCError(parent, "%s", error.c_str());
}
}