summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/versionstr.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/versionstr.cc b/src/versionstr.cc
index e90caa8..90557f6 100644
--- a/src/versionstr.cc
+++ b/src/versionstr.cc
@@ -79,8 +79,11 @@ VersionStr::operator std::string() const
{
std::string v;
char buf[64];
- if(patch()) sprintf(buf, "%d.%d.%d", major(), minor(), patch());
- else sprintf(buf, "%d.%d", major(), minor());
+ if(patch()) {
+ sprintf(buf, "%d.%d.%d", (int)major(), (int)minor(), (int)patch());
+ } else {
+ sprintf(buf, "%d.%d", (int)major(), (int)minor());
+ }
v = buf;
return v;
}