Fixed warnings on MSVC.

This commit is contained in:
Takatoshi Kondo
2015-08-12 12:51:12 +09:00
parent 4501551267
commit e50cc5d79f
5 changed files with 18 additions and 8 deletions

View File

@@ -585,7 +585,7 @@ TEST(MSGPACK_STL, simple_buffer_non_const_cstring)
val1 += 'a' + rand() % 26;
msgpack::sbuffer sbuf;
char* s = new char[val1.size() + 1];
std::strcpy(s, val1.c_str());
std::memcpy(s, val1.c_str(), val1.size() + 1);
msgpack::pack(sbuf, s);
delete [] s;
msgpack::unpacked ret;