Fix a rare error with keyboard_keys

Some combo binds will cause actionKeys to return a number greater than
six digits. See AgentRev's note:
https://community.bistudio.com/wiki/actionKeys

An example is NumLock + P [1.15763e+009]. Using a number this large as
an index errors out. Example:
test_array = [];
test_array set [9999991,true];

But six digits or less will not error:
test_array = [];
test_array set [999999,true];
This commit is contained in:
ebayShopper
2017-11-13 17:34:43 -05:00
parent eefcdf2610
commit c1110fc61c
2 changed files with 4 additions and 1 deletions

View File

@@ -240,7 +240,9 @@ if (isNil "keyboard_keys") then {
_addArray = {
{
keyboard_keys set [_x, _this select 1];
if (_x <= 999999) then {
keyboard_keys set [_x, _this select 1];
};
} forEach (_this select 0);
};