From e51bed25201e89b2fed36e45e1642812d88f6398 Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Tue, 07 Mar 2017 11:06:28 +0000
Subject: [PATCH] 增加对ODBC的支持。

---
 include/qtl_mysql.hpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/qtl_mysql.hpp b/include/qtl_mysql.hpp
index 60c552b..b0cb96b 100644
--- a/include/qtl_mysql.hpp
+++ b/include/qtl_mysql.hpp
@@ -297,6 +297,11 @@
 		m_binderAddins[index].m_after_fetch=[](const binder& bind) {
 			if(*bind.is_null)
 				memset(bind.buffer, 0, bind.buffer_length+1);
+			else
+			{
+				char* text=reinterpret_cast<char*>(bind.buffer);
+				text[*bind.length]='\0';
+			}
 		};
 	}
 

--
Gitblit v1.9.3