From 6d15e63f853a6c652d3d7c05e34cfb01bef3608e Mon Sep 17 00:00:00 2001 From: jonpas Date: Sun, 23 Aug 2015 19:48:57 +0200 Subject: [PATCH] Fixed #2222 - Allow spaces in slideshow module by just trimming the splitted input string rather than removing all whitespace --- addons/slideshow/functions/fnc_makeList.sqf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/slideshow/functions/fnc_makeList.sqf b/addons/slideshow/functions/fnc_makeList.sqf index 8de87a2d96..8933c63c0a 100644 --- a/addons/slideshow/functions/fnc_makeList.sqf +++ b/addons/slideshow/functions/fnc_makeList.sqf @@ -4,7 +4,7 @@ * * Arguments: * 0: Text - * 1: Remove Whitespace + * 1: Trim Whitespace * 2: Check Nil * * Return Value: @@ -15,24 +15,24 @@ * * Public: No */ -//#define DEBUG_MODE_FULL +#define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_list", "_removeWhitespace", "_checkNil"]; +params ["_list", "_trimWhitespace", "_checkNil"]; -private ["_splittedList", "_listNoWhitespace", "_nilCheckPassedList"]; +private ["_splittedList", "_listTrimmedWhitespace", "_nilCheckPassedList"]; // Split using comma delimiter _splittedList = [_list, ","] call BIS_fnc_splitString; // Remove whitespace -_listNoWhitespace = []; -if (_removeWhitespace) then { +_listTrimmedWhitespace = []; +if (_trimWhitespace) then { { - _listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace)); + _listTrimmedWhitespace pushBack ([_x] call CBA_fnc_trim); nil } count _splittedList; - _list = _listNoWhitespace; + _list = _listTrimmedWhitespace; }; // Check for object existence @@ -53,6 +53,6 @@ if (_checkNil) then { _list = [] call compile _list; }; -TRACE_4("Lists",_splittedList,_listNoWhitespace,_nilCheckPassedList,_list); +TRACE_4("Lists",_splittedList,_listTrimmedWhitespace,_nilCheckPassedList,_list); _list // return