diff --git a/Core/Inc/FConfigCacheIni.h b/Core/Inc/FConfigCacheIni.h index 0edf7efe..bd5ea65e 100644 --- a/Core/Inc/FConfigCacheIni.h +++ b/Core/Inc/FConfigCacheIni.h @@ -339,7 +339,12 @@ class FConfigCacheIni : public FConfigCache, public TMap{ const TCHAR* GetStr(const TCHAR* Section, const TCHAR* Key, const TCHAR* Filename){ guard(FConfigCacheIni::GetStr); - TCHAR* Result = appStaticString1024(); + // appStaticString1024 is broken and shouldn't be used + //TCHAR* Result = appStaticString1024(); + static INT Idx = 0; + static TCHAR Buffer[4][1024]; + + TCHAR* Result = Buffer[Idx++ & 3]; if(GetString(Section, Key, Result, 1024, Filename)) return Result; diff --git a/Core/Inc/UnFile.h b/Core/Inc/UnFile.h index 0167778c..725dcb2c 100644 --- a/Core/Inc/UnFile.h +++ b/Core/Inc/UnFile.h @@ -317,7 +317,7 @@ CORE_API TCHAR* appStrcat(TCHAR* Dest, const TCHAR* Src); CORE_API INT appStrcmp(const TCHAR* String1, const TCHAR* String2); CORE_API INT appStricmp(const TCHAR* String1, const TCHAR* String2); CORE_API INT appStrncmp(const TCHAR* String1, const TCHAR* String2, INT Count); -CORE_API TCHAR* appStaticString1024(); +//CORE_API TCHAR* appStaticString1024(); // Broken, don't use! CORE_API const TCHAR* appSpc(int Num); CORE_API TCHAR* appStrncpy(TCHAR* Dest, const TCHAR* Src, int Max);