From 54d66d18b903fe58a45c84ed6bd6804e02929896 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 9 Oct 2015 22:51:55 -0500 Subject: [PATCH] Fix bounds checking on removePFEH --- addons/ai/CfgFunctions.hpp | 2 +- addons/common/fnc_removePerFrameHandler.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/ai/CfgFunctions.hpp b/addons/ai/CfgFunctions.hpp index 962a7aaf2..715586fdf 100644 --- a/addons/ai/CfgFunctions.hpp +++ b/addons/ai/CfgFunctions.hpp @@ -44,7 +44,7 @@ class CfgFunctions { description = "A function used to have AI search a given marker or trigger area indefinitely. Includes random building searches."; file = "\x\cba\addons\ai\fnc_taskSearchArea.sqf"; - } + }; }; }; }; diff --git a/addons/common/fnc_removePerFrameHandler.sqf b/addons/common/fnc_removePerFrameHandler.sqf index 23a9f1d66..ec662f4bc 100644 --- a/addons/common/fnc_removePerFrameHandler.sqf +++ b/addons/common/fnc_removePerFrameHandler.sqf @@ -26,7 +26,7 @@ Author: params ["_publicHandle"]; -if (isNil "_publicHandle" || {(_publicHandle < 0)} || {!((count GVAR(PFHhandles)) >= _publicHandle)}) exitWith { // Nil/no handle, nil action or handle is larger than Public Handle Array +if (isNil "_publicHandle" || {_publicHandle < 0} || {(count GVAR(PFHhandles)) <= _publicHandle}) exitWith {// Nil/no handle or handle is out of bounds of Public Handle Array WARNING("Invalid or not existing PFH ID."); };