Remove static buffers from StringHelpers to prevent overwriting strings from another thread.

This commit is contained in:
Soggy_Pancake 2026-03-19 18:09:34 -07:00
parent 3f7745b262
commit 5d459c0ff9
15 changed files with 68 additions and 55 deletions

View file

@ -18,7 +18,7 @@
//SecurityException - if a security manager exists and its checkRead method denies read access to the file.
FileInputStream::FileInputStream(const File &file)
{
const char *pchFilename=wstringtofilename(file.getPath());
std::string pchFilename=wstringtofilename(file.getPath());
#ifdef _UNICODE
m_fileHandle = CreateFile(
file.getPath().c_str(), // file name
@ -31,7 +31,7 @@ FileInputStream::FileInputStream(const File &file)
);
#else
m_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