Bugfixes for wchar_t handling

This commit is contained in:
baldurk
2014-11-28 21:11:49 +00:00
parent 35b670d37c
commit c1c6d635d9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ uint32_t Process::CreateAndInjectIntoProcess(const char *app, const char *workin
paramsAlloc = new wchar_t[len];
RDCEraseMem(paramsAlloc, len);
RDCEraseMem(paramsAlloc, len*sizeof(wchar_t));
wcscpy_s(paramsAlloc, len, L"\"");
wcscat_s(paramsAlloc, len, wapp.c_str());
+2 -2
View File
@@ -45,7 +45,7 @@ template<class strType> strType basename(const strType &path)
if(base[base.length()-1] == '/' || base[base.length()-1] == '\\')
base.erase(base.size()-1);
typename strType::value_type pathSep[2] = { '\\', '/' };
typename strType::value_type pathSep[3] = { '\\', '/', 0 };
size_t offset = base.find_last_of(pathSep);
@@ -65,7 +65,7 @@ template<class strType> strType dirname(const strType &path)
if(base[base.length()-1] == '/' || base[base.length()-1] == '\\')
base.erase(base.size()-1);
typename strType::value_type pathSep[2] = { '\\', '/' };
typename strType::value_type pathSep[3] = { '\\', '/', 0 };
size_t offset = base.find_last_of(pathSep);