Fixes IfcUtil::valid_binary_string so it returns false for an empty string

This commit is contained in:
Rick Brice
2021-04-20 08:52:48 -07:00
committed by Thomas Krijnen
parent 64e6561828
commit 2514e93a8d
+1 -1
View File
@@ -173,7 +173,7 @@ bool IfcUtil::valid_binary_string(const std::string& s) {
for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) { for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) {
if (*it != '0' && *it != '1') return false; if (*it != '0' && *it != '1') return false;
} }
return true; return s.empty() ? false : true;
} }
void IfcUtil::sanitate_material_name(std::string &str) void IfcUtil::sanitate_material_name(std::string &str)