One (last?) fix for compilation errors with MSVC++
This commit is contained in:
parent
d3c5c45262
commit
7e06e5382a
@ -988,7 +988,7 @@ std::wstring SGPath::wstr() const
|
|||||||
{
|
{
|
||||||
#ifdef SG_WINDOWS
|
#ifdef SG_WINDOWS
|
||||||
size_t buflen = mbstowcs(NULL, path.c_str(), 0)+1;
|
size_t buflen = mbstowcs(NULL, path.c_str(), 0)+1;
|
||||||
wchar_t* wideBuf = malloc(buflen * sizeof(int));
|
wchar_t* wideBuf = (wchar_t*)malloc(buflen * sizeof(int));
|
||||||
if (wideBuf) {
|
if (wideBuf) {
|
||||||
size_t count = mbstowcs(wideBuf, path.c_str(), buflen);
|
size_t count = mbstowcs(wideBuf, path.c_str(), buflen);
|
||||||
if (count == (size_t)-1) {
|
if (count == (size_t)-1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user