summaryrefslogtreecommitdiff
path: root/libpqpp/pq-column.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/pq-column.cpp')
-rw-r--r--libpqpp/pq-column.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpqpp/pq-column.cpp b/libpqpp/pq-column.cpp
index 5e02015..eb5d291 100644
--- a/libpqpp/pq-column.cpp
+++ b/libpqpp/pq-column.cpp
@@ -72,7 +72,8 @@ PQ::Column::apply(DB::HandleField & h) const
int days = 0, hours = 0, minutes = 0, seconds = 0, fractions = 0, flen1 = 0, flen2 = 0;
const char * val = value();
if (sscanf(val, "%d %*[days] %d:%d:%d.%n%d%n", &days, &hours, &minutes, &seconds, &flen1, &fractions, &flen2) >= 4) {
- h.interval(boost::posix_time::time_duration((24 * days) + hours, minutes, seconds, fractions * pow(10, boost::posix_time::time_res_traits::num_fractional_digits() + flen1 - flen2)));
+ h.interval(boost::posix_time::time_duration((24 * days) + hours, minutes, seconds,
+ fractions * (long)pow(10, boost::posix_time::time_res_traits::num_fractional_digits() + flen1 - flen2)));
}
else {
h.interval(boost::posix_time::duration_from_string(value()));