From ad0282622fc7ae88e2c844842a415968f1de10fe Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 25 Jul 2018 13:38:22 +0200 Subject: [PATCH 1/1] #3204 crea Feature New Normal branch mingw64 --- src/creaSystem.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/creaSystem.cxx b/src/creaSystem.cxx index 5640b07..a05556b 100644 --- a/src/creaSystem.cxx +++ b/src/creaSystem.cxx @@ -100,8 +100,8 @@ int System::GetAppPath(char *pname, size_t pathsize) //2018-07-06 mingw64 wchar_t pname2[512]; - mbstowcs(pname2,pname,strlen(pname)+1); long result = GetModuleFileName(NULL, pname2, pathsize); + int ret = wcstombs ( pname, pname2, sizeof(pname) ); // long result = GetModuleFileName(NULL, pname, pathsize); if (result > 0) @@ -219,8 +219,8 @@ std::string System::GetDllAppPath(std::string &nomdll){ //2018-07-06 mingw64 wchar_t currentPath2[512]; - mbstowcs(currentPath2,currentPath,strlen(currentPath)+1); GetModuleFileName(hand, currentPath2, _MAX_PATH); + int ret = wcstombs ( currentPath, currentPath2, sizeof(pname) ); // GetModuleFileName(hand, currentPath, _MAX_PATH); path = currentPath; @@ -244,8 +244,8 @@ std::string System::GetDllAppPath(const char *nomdll){ //2018-07-06 mingw64 wchar_t currentPath2[512]; - mbstowcs(currentPath2,currentPath,strlen(currentPath)+1); GetModuleFileName(hand, currentPath2, _MAX_PATH); + int ret = wcstombs ( currentPath, currentPath2, sizeof(pname) ); // GetModuleFileName(hand, currentPath, _MAX_PATH); path = currentPath; -- 2.46.1