MSVC Fixes

This commit is contained in:
Jason Turner
2015-03-13 22:27:51 -06:00
parent c584c29951
commit b71f9db5c2
2 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ char *mystrdup (const char *s) {
char *d = static_cast<char*>(malloc (len+1));
if (d == nullptr) return nullptr; // No memory
#ifdef CHAISCRIPT_MSVC
strcpy_s(d, len, s); // Copy the characters
strcpy_s(d, len+1, s); // Copy the characters
#else
strncpy(d,s,len); // Copy the characters
#endif