From 7dc48c7c0b300251b6a9c0d3aa95f5d550d203b8 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Tue, 22 Dec 2015 14:39:41 -0500 Subject: [PATCH] fix issue #34 --- source/serialization/shared_strings_serializer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/serialization/shared_strings_serializer.cpp b/source/serialization/shared_strings_serializer.cpp index 8a3c10bd..76cd30da 100644 --- a/source/serialization/shared_strings_serializer.cpp +++ b/source/serialization/shared_strings_serializer.cpp @@ -27,8 +27,12 @@ bool shared_strings_serializer::read_shared_strings(const xml_document &xml, std strings.clear(); auto root_node = xml.get_child("sst"); + auto unique_count = 0; - auto unique_count = std::stoull(root_node.get_attribute("uniqueCount")); + if (root_node.has_attribute("uniqueCount")) + { + unique_count = std::stoull(root_node.get_attribute("uniqueCount")); + } for (const auto &si_node : root_node.get_children()) {