From 2514e93a8dd8d58f5295b28ab81cfb1dfddcd765 Mon Sep 17 00:00:00 2001 From: Rick Brice Date: Tue, 20 Apr 2021 08:52:48 -0700 Subject: [PATCH] Fixes IfcUtil::valid_binary_string so it returns false for an empty string --- src/ifcparse/IfcUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcparse/IfcUtil.cpp b/src/ifcparse/IfcUtil.cpp index 6578fec347..2a87c1f9bd 100644 --- a/src/ifcparse/IfcUtil.cpp +++ b/src/ifcparse/IfcUtil.cpp @@ -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) { if (*it != '0' && *it != '1') return false; } - return true; + return s.empty() ? false : true; } void IfcUtil::sanitate_material_name(std::string &str)