Fix bug with handling of invalid maxhullvert values (smaller than 4).

PiperOrigin-RevId: 734136442
Change-Id: I531e5a5b9244e026a9368e0d6a83d2b559c1b58d
This commit is contained in:
Kyle Bayes
2025-03-06 07:32:33 -08:00
committed by Copybara-Service
parent a0fc6b18b5
commit 37d6d7792a
+1 -1
View File
@@ -1434,7 +1434,7 @@ void mjXReader::OneMesh(XMLElement* elem, mjsMesh* mesh, const mjVFS* vfs) {
}
if (ReadAttrInt(elem, "maxhullvert", &n)) {
if (n != 0 && n < 4) throw mjXError(elem, "maxhullvert must be larger than 3");
if (n != -1 && n < 4) throw mjXError(elem, "maxhullvert must be larger than 3");
mesh->maxhullvert = n;
}