Check appearance and option array lengths.
This commit is contained in:
@@ -155,7 +155,11 @@ public class AppearanceItemData implements IXmlReader
|
||||
|
||||
public AppearanceStone getStone(int stone)
|
||||
{
|
||||
return _stones[stone];
|
||||
if (_stones.length >= stone)
|
||||
{
|
||||
return _stones[stone];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -119,7 +119,11 @@ public class OptionData implements IXmlReader
|
||||
|
||||
public Options getOptions(int id)
|
||||
{
|
||||
return _options[id];
|
||||
if (_options.length >= id)
|
||||
{
|
||||
return _options[id];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user