prevent crash when calling ToString() on engine-returned FString

This commit is contained in:
ApfelTeeSaft
2026-02-02 08:19:41 +01:00
parent 1f3a11ed29
commit 00ffcfaf0c
2 changed files with 96 additions and 14 deletions
+4 -1
View File
@@ -395,7 +395,10 @@ namespace USS
FString EngineVersion = GetEngineVersion();
// @timmie NOTE: ToString looked fine to me but the issue is it's going to crash the game for an second
// Engine returns FString by value - our FString wrapper detects this via the
// ownership flag (sign bit of m_Max) and won't try to delete[] engine memory.
// Note: The engine-allocated buffer becomes a small one-time memory leak, which
// is acceptable for version detection that runs once at startup.
std::string EngineVer = EngineVersion.ToString();
size_t DashPos = EngineVer.find("-");