]> git.mxchange.org Git - simgear.git/commitdiff
One (last?) fix for compilation errors with MSVC++
authorBertrand Coconnier <bcoconni@users.sourceforge.net>
Sun, 3 Jul 2016 10:38:56 +0000 (12:38 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/misc/sg_path.cxx

index 7c37d705ba3ebc49f734814e81e16991d1f9907d..a2f6842feabb12df01b9aed14c0f6d8cf5903857 100644 (file)
@@ -988,7 +988,7 @@ std::wstring SGPath::wstr() const
 {
 #ifdef SG_WINDOWS
    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) {
        size_t count = mbstowcs(wideBuf, path.c_str(), buflen);
        if (count == (size_t)-1) {