summaryrefslogtreecommitdiff
path: root/type.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2023-11-06 13:52:49 -0500
committerPeter LaFosse <peter@vector35.com>2023-11-06 13:52:49 -0500
commit6262d76df45950bb75fb3a0bc5a1a45a5da00e00 (patch)
tree21a57a8218ab75be547824c30c8e6073b8558ad7 /type.cpp
parentffbe99733f7c2ae68017464eb8badd84ff0a7014 (diff)
Fix NameList.StringSize() for empyty NameLists
Diffstat (limited to 'type.cpp')
-rw-r--r--type.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/type.cpp b/type.cpp
index e6e348e5..fc90faf5 100644
--- a/type.cpp
+++ b/type.cpp
@@ -217,6 +217,8 @@ size_t NameList::size() const
size_t NameList::StringSize() const
{
+ if (m_name.size() == 0)
+ return 0;
size_t size = 0;
for (auto& name : m_name)
size += name.size() + m_join.size();