From 4f2497446d20ac418f0f3a5269dbd53331de2615 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Sun, 24 Jul 2011 19:33:18 +0200 Subject: Always initialize format and size values in native_bind --- odb/pgsql/statement.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/odb/pgsql/statement.cxx b/odb/pgsql/statement.cxx index a9c7d9b..3f5b340 100644 --- a/odb/pgsql/statement.cxx +++ b/odb/pgsql/statement.cxx @@ -86,6 +86,9 @@ namespace odb { const bind& current_bind (b.bind[i]); + n.formats[i] = 1; + n.lengths[i] = 0; + if (current_bind.is_null != 0 && *current_bind.is_null) { n.values[i] = 0; @@ -93,7 +96,6 @@ namespace odb } n.values[i] = reinterpret_cast (current_bind.buffer); - n.formats[i] = 1; size_t l; -- cgit v1.1