From 7b16f03aa0c19332438f228dd9847fe6e006d42c Mon Sep 17 00:00:00 2001 From: Philippe Daouadi Date: Wed, 7 Mar 2018 10:28:10 +0100 Subject: [PATCH] Fix blob result_type --- include/sqlpp11/data_types/blob/result_field.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sqlpp11/data_types/blob/result_field.h b/include/sqlpp11/data_types/blob/result_field.h index df28e203..a790c714 100644 --- a/include/sqlpp11/data_types/blob/result_field.h +++ b/include/sqlpp11/data_types/blob/result_field.h @@ -40,7 +40,7 @@ namespace sqlpp struct result_field_t> : public result_field_base> { - const char* blob{nullptr}; // Non-owning + const uint8_t* blob{nullptr}; // Non-owning size_t len{}; template @@ -48,9 +48,9 @@ namespace sqlpp { target._bind_blob_result(index, &blob, &len); if (blob) - this->_value.assign(blob, len); + this->_value.assign(blob, blob+len); else - this->_value.assign(""); + this->_value.clear(); this->_is_null = (blob == nullptr); } @@ -59,9 +59,9 @@ namespace sqlpp { target._post_bind_blob_result(index, &blob, &len); if (blob) - this->_value.assign(blob, len); + this->_value.assign(blob, blob+len); else - this->_value.assign(""); + this->_value.clear(); this->_is_null = (blob == nullptr); } };