Remove static buffers from StringHelpers to prevent overwriting strings from another thread.
This commit is contained in:
parent
3f7745b262
commit
5d459c0ff9
15 changed files with 68 additions and 55 deletions
|
|
@ -588,9 +588,9 @@ int LevelGenerationOptions::packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD
|
|||
nullptr // Unsupported
|
||||
);
|
||||
#else
|
||||
const char *pchFilename=wstringtofilename(grf.getPath());
|
||||
std::string pchFilename=wstringtofilename(grf.getPath());
|
||||
HANDLE fileHandle = CreateFile(
|
||||
pchFilename, // file name
|
||||
pchFilename.c_str(), // file name
|
||||
GENERIC_READ, // access mode
|
||||
0, // share mode // TODO 4J Stu - Will we need to share file? Probably not but...
|
||||
nullptr, // Unused
|
||||
|
|
@ -640,9 +640,9 @@ int LevelGenerationOptions::packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD
|
|||
nullptr // Unsupported
|
||||
);
|
||||
#else
|
||||
const char *pchFilename=wstringtofilename(save.getPath());
|
||||
auto pchFilename=wstringtofilename(save.getPath());
|
||||
HANDLE fileHandle = CreateFile(
|
||||
pchFilename, // file name
|
||||
pchFilename.c_str(), // file name
|
||||
GENERIC_READ, // access mode
|
||||
0, // share mode // TODO 4J Stu - Will we need to share file? Probably not but...
|
||||
nullptr, // Unused
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue