From ecc8b93c2378988d8c13285eb02d4dc3e977c2ea Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Sun, 24 Jul 2011 19:36:35 +0200 Subject: Correct bug in calculation of varbit byte length --- pgsql/types/traits.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pgsql') diff --git a/pgsql/types/traits.hxx b/pgsql/types/traits.hxx index be45aa8..de56dc0 100644 --- a/pgsql/types/traits.hxx +++ b/pgsql/types/traits.hxx @@ -129,7 +129,7 @@ namespace odb details::endian_traits::ntoh ( *reinterpret_cast (b.data ()))); - std::size_t byte_len = v.size / 8 + v.size % 8 > 0 ? 1 : 0; + std::size_t byte_len = v.size / 8 + (v.size % 8 > 0 ? 1 : 0); assert (n >= byte_len + 4); v.ubuffer_.assign (b.data () + 4, byte_len); -- cgit v1.1