Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop

This commit is contained in:
Jason Turner 2015-03-21 14:15:06 -06:00
commit 9c1f5b6830
2 changed files with 4 additions and 4 deletions

View File

@ -150,8 +150,8 @@ namespace chaiscript
return std::string(t_str.begin(), t_str.end());
}
#ifdef _UNICODE
template<typename T>
#if defined(_UNICODE) || defined(UNICODE)
template<typename T>
static std::wstring to_proper_string(const T &t_str)
{
return to_wstring(t_str);
@ -166,7 +166,7 @@ namespace chaiscript
static std::string get_error_message(DWORD t_err)
{
#ifdef _UNICODE
#if defined(_UNICODE) || defined(UNICODE)
typedef LPWSTR StringType;
std::wstring retval = L"Unknown Error";
#else

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