[odb-users] [PATCH] libodb-pgsql: correct reference to rnull.

microcaicai at gmail.com microcaicai at gmail.com
Wed Oct 21 08:17:47 EDT 2020


From: microcai <microcaicai at gmail.com>

rnull[1] has only 1 element, thus rnull[1] is illegal.
---
 odb/pgsql/database.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx
index 5c60957..51752d7 100644
--- a/odb/pgsql/database.cxx
+++ b/odb/pgsql/database.cxx
@@ -319,7 +319,7 @@ namespace odb
         native_binding nparam (values, lengths, formats, 1);
 
         bool rnull[1];
-        bind rbind[1] = {{bind::boolean_, &exists, 0, 0, &rnull[1], 0}};
+        bind rbind[1] = {{bind::boolean_, &exists, 0, 0, &rnull[0], 0}};
         binding result (rbind, 1);
         result.version++;
 
-- 
2.28.0



More information about the odb-users mailing list