From 163fe3756d73083aa8efd6abbd249dd349a1d5fa Mon Sep 17 00:00:00 2001 From: ZehMatt Date: Tue, 27 Jul 2021 21:10:06 +0300 Subject: [PATCH] Fix GameStateSnapshots buffer overrun --- src/openrct2/GameStateSnapshots.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 8ba15a0de6..3a95370b77 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -253,10 +253,16 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, InteractionRideIndex); COMPARE_FIELD(Peep, Id); COMPARE_FIELD(Peep, PathCheckOptimisation); - COMPARE_FIELD(Peep, PathfindGoal); + COMPARE_FIELD(Peep, PathfindGoal.x); + COMPARE_FIELD(Peep, PathfindGoal.y); + COMPARE_FIELD(Peep, PathfindGoal.z); + COMPARE_FIELD(Peep, PathfindGoal.direction); for (int i = 0; i < 4; i++) { - COMPARE_FIELD(Peep, PathfindHistory[i]); + COMPARE_FIELD(Peep, PathfindHistory[i].x); + COMPARE_FIELD(Peep, PathfindHistory[i].y); + COMPARE_FIELD(Peep, PathfindHistory[i].z); + COMPARE_FIELD(Peep, PathfindHistory[i].direction); } COMPARE_FIELD(Peep, WalkingFrameNum); }