mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Bugfixes for wchar_t handling
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user