Fixed OOB exception on buildings with turnstiles that do have more patrons than timestamps.

This commit is contained in:
Cekis
2018-03-23 16:00:41 -07:00
committed by CekisSWG
parent 946d0ac945
commit 07a6e5eb17
@@ -233,7 +233,7 @@ public class turnstile extends script.base_script
return false;
}
int arrayPosition = utils.getElementPositionInArray(patrons, player);
if (arrayPosition == -1)
if (arrayPosition == -1 || arrayPosition >= timestamps.length)
{
return false;
}