From f1f8e2d7b8c0a9dcf91d6dbaef69e13eda8c1562 Mon Sep 17 00:00:00 2001 From: s1lent Date: Thu, 2 Feb 2017 23:56:35 +0700 Subject: [PATCH] Fix crash caused by an bug of nav_file.cpp (Part 2) --- regamedll/game_shared/bot/nav_file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regamedll/game_shared/bot/nav_file.cpp b/regamedll/game_shared/bot/nav_file.cpp index ed910745..730ba6f3 100644 --- a/regamedll/game_shared/bot/nav_file.cpp +++ b/regamedll/game_shared/bot/nav_file.cpp @@ -465,7 +465,7 @@ NavErrorType CNavArea::PostLoad() // connect areas together for (int d = 0; d < NUM_DIRECTIONS; ++d) { - for (auto connect : m_connect[d]) + for (auto& connect : m_connect[d]) { auto id = connect.id; connect.area = TheNavAreaGrid.GetNavAreaByID(id); @@ -503,7 +503,7 @@ NavErrorType CNavArea::PostLoad() } // resolve spot encounter IDs - for (auto spote : m_spotEncounterList) + for (auto& spote : m_spotEncounterList) { spote.from.area = TheNavAreaGrid.GetNavAreaByID(spote.from.id); if (spote.from.area == NULL) @@ -532,7 +532,7 @@ NavErrorType CNavArea::PostLoad() } // resolve HidingSpot IDs - for (auto order : spote.spotList) + for (auto& order : spote.spotList) { order.spot = GetHidingSpotByID(order.id); if (order.spot == NULL)