diff --git a/src/STEPToMesh.cpp b/src/STEPToMesh.cpp index 42cddf2..3c99b66 100644 --- a/src/STEPToMesh.cpp +++ b/src/STEPToMesh.cpp @@ -112,7 +112,7 @@ void write(const std::string& outFile, const std::vector& namedSolid else { try { int index{std::stoi(sel)}; - if (index < 1 || index > namedSolids.size()) throw std::logic_error{std::string{"Index out of range: "} + sel}; + if (index < 1 || static_cast(index) > namedSolids.size()) throw std::logic_error{std::string{"Index out of range: "} + sel}; builder.Add(compound, namedSolids[index - 1].solid); } catch (const std::invalid_argument&) {