The index can never be equal to the array length.

This commit is contained in:
MobiusDevelopment
2020-11-02 23:33:24 +00:00
parent 494b39a3ab
commit 040af7569b
57 changed files with 78 additions and 78 deletions

View File

@@ -176,7 +176,7 @@ public class ArmorSetData implements IXmlReader
*/
public boolean isArmorSet(int chestId)
{
return (_armorSets.length >= chestId) && (_armorSets[chestId] != null);
return (_armorSets.length > chestId) && (_armorSets[chestId] != null);
}
/**
@@ -186,7 +186,7 @@ public class ArmorSetData implements IXmlReader
*/
public ArmorSet getSet(int chestId)
{
if (_armorSets.length >= chestId)
if (_armorSets.length > chestId)
{
return _armorSets[chestId];
}

View File

@@ -153,7 +153,7 @@ public class OptionData implements IXmlReader
public Options getOptions(int id)
{
if (_options.length >= id)
if (_options.length > id)
{
return _options[id];
}