From 9056429ac103dddea7df241181c0366afb10e412 Mon Sep 17 00:00:00 2001 From: dgelessus Date: Sun, 23 Jul 2023 01:10:02 +0200 Subject: [PATCH] Replace hsRAMStream::Truncate call with Reset to match new behavior The previous implementation of hsRAMStream::Truncate incorrectly deleted the entire stream data, not just starting at the current seek position. --- Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp index 18eee1a2e4..3ad3560935 100644 --- a/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp +++ b/Sources/Plasma/PubUtilLib/plNetCommon/plNetCommonHelpers.cpp @@ -275,7 +275,7 @@ void plCreatableListHelper::Write( hsStream* s, hsResMgr* mgr ) } } - ram.Truncate(); + ram.Reset(); ram.WriteByte(fFlags); ram.WriteLE32(bufSz);