summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index dc7b7333286..762d7203d31 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -104,7 +104,12 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt
}
else if(bp && bp->kind() == Builtin::KindFloat)
{
- out << value << "F";
+ out << value;
+ if(value.find(".") == string::npos)
+ {
+ out << ".0";
+ }
+ out << "F";
}
else
{