summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/versionstr.cc7
-rw-r--r--src/versionstr.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/versionstr.cc b/src/versionstr.cc
index be6913b..8c6c66f 100644
--- a/src/versionstr.cc
+++ b/src/versionstr.cc
@@ -46,6 +46,7 @@
VersionStr::VersionStr(const std::string& v)
{
+ version = {{0, 0, 0}};
set(v);
}
@@ -66,7 +67,7 @@ void VersionStr::set(const std::string& v)
{
if(idx > 2)
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string is too long.");
return;
}
@@ -80,14 +81,14 @@ void VersionStr::set(const std::string& v)
}
else
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string contains illegal character.");
return;
}
}
if(idx > 2)
{
- version = {0, 0, 0};
+ version = {{0, 0, 0}};
ERR(version, "Version string is too long.");
return;
}
diff --git a/src/versionstr.h b/src/versionstr.h
index 9fc2fcd..2a8a131 100644
--- a/src/versionstr.h
+++ b/src/versionstr.h
@@ -108,5 +108,5 @@ public:
private:
void set(const std::string& v);
- std::array<size_t, 3> version = {0, 0, 0};
+ std::array<size_t, 3> version;
};