From f87081a1b1aaff50c5b92ba0e385fb408f769cca Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Fri, 6 Oct 2017 21:42:41 -0500 Subject: [PATCH] fix param copy --- Data/ODBC/src/Binder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/ODBC/src/Binder.cpp b/Data/ODBC/src/Binder.cpp index 92aeac83c..f7fd13a43 100644 --- a/Data/ODBC/src/Binder.cpp +++ b/Data/ODBC/src/Binder.cpp @@ -245,7 +245,7 @@ void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir, const CharT* pChar = (CharT*)std::calloc(size, sizeof(CharT)); pVal = (SQLPOINTER)pChar; if (isInOutBound(dir)) - std::wcscpy(pChar,val.c_str()); + std::copy(val.begin(), val.end(), pChar); _outParams.insert(ParamMap::value_type(pVal, size)); _utf16Strings.insert(UTF16StringMap::value_type(pChar, const_cast(&val))); }