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

@ -60,8 +60,8 @@ std::vector<BYTE> ZipFile::extract(const std::wstring* name) {
return buffer;
}
catch (exception e) {
OutputDebugString(wstringtochararray(L"Error extracting file from zip: " + *name + L'\n'));
OutputDebugString(wstringtochararray(L"Exception: " + convStringToWstring(e.what()) + L'\n'));
app.DebugPrintf(wstringtostring(L"Error extracting file from zip: " + *name + L'\n').c_str());
app.DebugPrintf(wstringtostring(L"Exception: " + convStringToWstring(e.what()) + L'\n').c_str());
__debugbreak();
return {};
}
@ -132,8 +132,8 @@ bool ZipFile::open(File* file) {
}
}
catch (exception e) {
OutputDebugString(wstringtochararray(L"Error opening zip file: " + file->getPath()));
OutputDebugString(wstringtochararray(L"\nException: " + convStringToWstring(e.what())));
app.DebugPrintf(wstringtostring(L"Error opening zip file: " + file->getPath()).c_str());
app.DebugPrintf(wstringtostring(L"\nException: " + convStringToWstring(e.what())).c_str());
__debugbreak();
}
return false;