summaryrefslogtreecommitdiff
path: root/libpqpp/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/command.cpp')
-rw-r--r--libpqpp/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/command.cpp b/libpqpp/command.cpp
index eb5a6bf..7617bd1 100644
--- a/libpqpp/command.cpp
+++ b/libpqpp/command.cpp
@@ -107,14 +107,14 @@ void
PQ::Command::bindParamF(unsigned int n, double v)
{
paramsAtLeast(n);
- lengths[n] = asprintf(&values[n], "%f", v);
+ lengths[n] = asprintf(&values[n], "%g", v);
formats[n] = 0;
}
void
PQ::Command::bindParamF(unsigned int n, float v)
{
paramsAtLeast(n);
- lengths[n] = asprintf(&values[n], "%f", v);
+ lengths[n] = asprintf(&values[n], "%g", v);
formats[n] = 0;
}
void