Skip to content

Commit

Permalink
Merge pull request #1273 from veteran29/cba-settings-parse-popup-erro…
Browse files Browse the repository at this point in the history
…r-fix

Prevent script error on comment lines in settings file
  • Loading branch information
commy2 authored Jan 2, 2020
2 parents ee0f2cc + 4f78c78 commit bd9f0c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/settings/fnc_parse.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ _result = [];
private _indexEqualSign = _x find "=";

private _setting = (_x select [0, _indexEqualSign]) call CBA_fnc_rightTrim;
private _value = ((_x select [_indexEqualSign + 1]) call CBA_fnc_trim) call _fnc_parseAny;
private _priority = 0;

if (_setting select [0, count "force"] == "force") then {
Expand All @@ -68,6 +67,8 @@ _result = [];
};

if (_setting != "") then {
private _value = ((_x select [_indexEqualSign + 1]) call CBA_fnc_trim) call _fnc_parseAny;

if !(_validate) then {
_result pushBack [_setting, _value, _priority];
} else {
Expand Down

0 comments on commit bd9f0c4

Please sign in to comment.