From 91ace4fc9b479aded7c9baca48b44a220384a858 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 2 Dec 2015 23:58:41 -0600 Subject: [PATCH] Fix whitelist string -> array error in checkPbo Fix #2913 Use splitString instead of call compile to convert string into an array --- addons/common/XEH_postInit.sqf | 2 +- addons/common/functions/fnc_checkPBOs.sqf | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 0ca9f51329d..ce75ad5187e 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -167,7 +167,7 @@ call FUNC(checkFiles); [ GVAR(checkPBOsAction), GVAR(checkPBOsCheckAll), - call compile GVAR(checkPBOsWhitelist) + GVAR(checkPBOsWhitelist) ] call FUNC(checkPBOs) }] call FUNC(addEventHandler); diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index f28d281ebcd..a196e8d4cae 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -9,7 +9,7 @@ * 1 = Warn permanently * 2 = Kick * 1: Check all PBOs? (default: false) - * 2: Whitelist (default: "[]") + * 2: Whitelist (default: "") * * Return Value: * None @@ -18,9 +18,13 @@ */ #include "script_component.hpp" -params ["_mode", ["_checkAll", false], ["_whitelist", "[]"]]; +params ["_mode", ["_checkAll", false], ["_whitelist", "", [""]]]; +TRACE_3("params",_mode,_checkAll,_whitelist); -_whitelist = [_whitelist, {toLower _this}] call FUNC(map); +//lowercase and convert whiteList String into array of strings: +_whitelist = toLower _whitelist; +_whitelist = _whitelist splitString "[,""']"; +TRACE_1("Array",_whitelist); ACE_Version_CheckAll = _checkAll; ACE_Version_Whitelist = _whitelist;