aboutsummaryrefslogtreecommitdiff
path: root/mssql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-08 13:17:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-08 13:17:28 +0200
commitd88f15a3c9272dddc53b5fcba6ee04697ec5c82b (patch)
tree485357fe99bf886e4402e5650b6e1b714fe3e15f /mssql
parenta2dee4c3155a5892ea8e09f4d1712e0b60985dea (diff)
Recode strcpy as memcpy
VC12 deprecated those hard, as in, it is now an error.
Diffstat (limited to 'mssql')
-rw-r--r--mssql/types/test.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/mssql/types/test.hxx b/mssql/types/test.hxx
index 15070e3..aea64cb 100644
--- a/mssql/types/test.hxx
+++ b/mssql/types/test.hxx
@@ -402,11 +402,11 @@ struct char_array
}
else
{
- std::strcpy (ls1, s);
- std::strcpy (ls2, s);
+ std::memcpy (ls1, s, std::strlen (s) + 1); // VC++ strcpy deprecation.
+ std::memcpy (ls2, s, std::strlen (s) + 1);
- std::wcscpy (lws1, ws);
- std::wcscpy (lws2, ws);
+ std::memcpy (lws1, ws, (std::wcslen (ws) + 1) * sizeof (wchar_t));
+ std::memcpy (lws2, ws, (std::wcslen (ws) + 1) * sizeof (wchar_t));
}
}