ShaderPatch: free old buffer when replacing data

This commit is contained in:
somewhatlurker
2019-10-04 21:11:05 +10:00
parent 9308788c90
commit 6274f23e5b
@@ -217,6 +217,7 @@ void hookedLoadFromFarcThunk(FArchivedFile** ppFile)
if (modifiedStr.length() > 0)
{
free(file.data);
file.data = _strdup(modifiedStr.c_str());
file.dataSize = modifiedStr.size();
printf("[ShaderPatch] Patched %s\n", file.fileName.GetCharBuf());