Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
This commit is contained in:
commit
9c1f5b6830
@ -150,7 +150,7 @@ namespace chaiscript
|
||||
return std::string(t_str.begin(), t_str.end());
|
||||
}
|
||||
|
||||
#ifdef _UNICODE
|
||||
#if defined(_UNICODE) || defined(UNICODE)
|
||||
template<typename T>
|
||||
static std::wstring to_proper_string(const T &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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user