Fixed potential index out of range error in Java client.
This commit is contained in:
@@ -467,7 +467,14 @@ public class XPlaneConnect implements AutoCloseable
|
|||||||
{
|
{
|
||||||
if(i == 4)
|
if(i == 4)
|
||||||
{
|
{
|
||||||
bb.put(cur, (byte) values[i]);
|
if(i >= values.length)
|
||||||
|
{
|
||||||
|
bb.put(cur, (byte)-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bb.put(cur, (byte)values[i]);
|
||||||
|
}
|
||||||
cur += 1;
|
cur += 1;
|
||||||
}
|
}
|
||||||
else if (i >= values.length)
|
else if (i >= values.length)
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user