From 2a2efefac30cec430d568266a3953e1205ce5378 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 17 Sep 2024 12:40:40 +0500 Subject: [PATCH] IfcSchema declaration_by_name to be safe Couldn't find if we actually use it anywhere in the code but better to keep it safe, especially because it's exposed to Python and by accident user might provide some too bit integer instead of a string. --- src/ifcparse/IfcSchema.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcparse/IfcSchema.h b/src/ifcparse/IfcSchema.h index c5139260db..3dedd47a8e 100644 --- a/src/ifcparse/IfcSchema.h +++ b/src/ifcparse/IfcSchema.h @@ -496,7 +496,7 @@ class IFC_PARSE_API schema_definition { } const declaration* declaration_by_name(size_t name) const { - return declarations_[name]; + return declarations_.at(name); } const std::vector& declarations() const { return declarations_; }