From 3d28a92a6d436c5ed1f26d170cdd49327e7095e1 Mon Sep 17 00:00:00 2001 From: rbock Date: Sat, 28 Jan 2017 11:28:54 +0100 Subject: [PATCH] Fixed detection of NULL in text results --- include/sqlpp11/data_types/text/result_field.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sqlpp11/data_types/text/result_field.h b/include/sqlpp11/data_types/text/result_field.h index 80f16632..0c0f0d0b 100644 --- a/include/sqlpp11/data_types/text/result_field.h +++ b/include/sqlpp11/data_types/text/result_field.h @@ -47,7 +47,7 @@ namespace sqlpp size_t len{}; target._bind_text_result(index, &text, &len); this->_value = {text, len}; - this->_is_null = (len == 0); + this->_is_null = (text == nullptr); } template @@ -57,7 +57,7 @@ namespace sqlpp size_t len{}; target._post_bind_text_result(index, &text, &len); this->_value = {text, len}; - this->_is_null = (len == 0); + this->_is_null = (text == nullptr); } };