From 6f21860159cf5d6c7d49508f4adfa5732195d9dc Mon Sep 17 00:00:00 2001 From: Alexandr Akulich Date: Tue, 10 Nov 2015 19:31:01 +0600 Subject: [PATCH] xrEngine/CameraManager.cpp: Fixed out-of-loop variable usage. --- src/xrEngine/CameraManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xrEngine/CameraManager.cpp b/src/xrEngine/CameraManager.cpp index 5e1a5f96f43..fd4d38c68b2 100644 --- a/src/xrEngine/CameraManager.cpp +++ b/src/xrEngine/CameraManager.cpp @@ -113,7 +113,8 @@ CEffectorPP* CCameraManager::GetPPEffector(EEffectorPPType type) ECamEffectorType CCameraManager::RequestCamEffectorId() { - for (ECamEffectorType index = (ECamEffectorType)effCustomEffectorStartID; + ECamEffectorType index = (ECamEffectorType)effCustomEffectorStartID; + for (; GetCamEffector(index); index = (ECamEffectorType)(index + 1)) { @@ -124,7 +125,8 @@ ECamEffectorType CCameraManager::RequestCamEffectorId() EEffectorPPType CCameraManager::RequestPPEffectorId() { - for (EEffectorPPType index = (EEffectorPPType)effCustomEffectorStartID; + EEffectorPPType index = (EEffectorPPType)effCustomEffectorStartID; + for (; GetPPEffector(index); index = (EEffectorPPType)(index + 1)) {