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

@@ -74,6 +74,7 @@
[FIXED] Launchers and launcher ammo are now detected correctly in the sell menu when a player has a launcher and ammo with the same classname.
[FIXED] Wrong bleeding icon on Epoch legacy status UI
[FIXED] A locked door can now be auto unlocked right after placement by the player who built it
[FIXED] A rare error in keyboard.sqf for certain combination binds.
[NOTE] Fixes below were included in hotfix 1.0.6.1A (March 10th 2017) and are now in the default files.
[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions.

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);
};