From c7da7c49563d4a495566858b39d30c082fdc32bc Mon Sep 17 00:00:00 2001 From: Bertrand Coconnier Date: Sun, 3 Jul 2016 12:38:56 +0200 Subject: [PATCH] One (last?) fix for compilation errors with MSVC++ --- simgear/misc/sg_path.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index 7c37d705..a2f6842f 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -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) { -- 2.39.5