Skip to content

Commit

Permalink
Fix bug with handling of invalid maxhullvert values (smaller than 4).
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 734136442
Change-Id: I531e5a5b9244e026a9368e0d6a83d2b559c1b58d
  • Loading branch information
kbayes authored and copybara-github committed Mar 6, 2025
1 parent a0fc6b1 commit 37d6d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xml/xml_native_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 37d6d77

Please sign in to comment.