Skip to content

Commit

Permalink
Fix case-sensitive _loadoutIndex
Browse files Browse the repository at this point in the history
Co-authored-by: Grim <[email protected]>
  • Loading branch information
DartRuffian and LinkIsGrim authored Aug 6, 2024
1 parent 40d3c9d commit 0638c55
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addons/arsenal/functions/fnc_saveLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ if (_name == "" || {_loadout isEqualTo []}) exitWith { false };
private _loadouts = profileNamespace getVariable [QGVAR(saved_loadouts), []];
private _loadoutNames = _loadouts apply {toLower (_x#0)};

if (!_replaceExisting && {toLower _name in _loadoutNames}) exitWith { false };

private _loadoutIndex = _loadoutNames find _name;
private _loadoutIndex = _loadoutNames find toLower _name;

if (_loadoutIndex == -1) then {
_loadouts pushBack [_name, _loadout];
} else {
if (!_replaceExisting) exitWith { false };
_loadouts set [_loadoutIndex, [_name, _loadout]];
};

Expand Down

0 comments on commit 0638c55

Please sign in to comment.