diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-07-24 19:36:35 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-07-24 19:36:35 +0200 |
commit | ecc8b93c2378988d8c13285eb02d4dc3e977c2ea (patch) | |
tree | 927964547d9d788605de5e41fe9b571891d1e377 /pgsql/types | |
parent | d08c9fde0a20073cafd86e14983702eb84bd0626 (diff) |
Correct bug in calculation of varbit byte length
Diffstat (limited to 'pgsql/types')
-rw-r--r-- | pgsql/types/traits.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
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<const int*> (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); |