Added code to not fall into a ArrayIndexOutOfBounds. Still not clear why it happens.
This commit is contained in:
parent
fb5173c2e2
commit
db86a19d2b
2 changed files with 12 additions and 2 deletions
|
@ -305,14 +305,22 @@ public class ByteDictionarySource extends DictionarySource
|
|||
String tag;
|
||||
|
||||
if (defTags==null) tag = Integer.toString(source[0]+1);
|
||||
else tag = defTags[source[0]];
|
||||
else
|
||||
{
|
||||
if (source[0]<0 || source[0]>=defTags.length) return null;
|
||||
tag = defTags[source[0]];
|
||||
}
|
||||
|
||||
for (i=1; i<source.length; i++)
|
||||
{
|
||||
tag += ", ";
|
||||
|
||||
if (defTags==null) tag += Integer.toString(source[i]+1);
|
||||
else tag += defTags[source[i]];
|
||||
else
|
||||
{
|
||||
if (source[i]<0 || source[i]>=defTags.length) return null;
|
||||
tag += defTags[source[i]];
|
||||
}
|
||||
}
|
||||
|
||||
return tag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue