#2671: Fix command packet parsing for Float/Double arguments
This commit is contained in:
parent
941d7f7262
commit
7669801e69
@ -357,7 +357,7 @@ public class Commands extends DefinedPacket
|
|||||||
{
|
{
|
||||||
byte flags = buf.readByte();
|
byte flags = buf.readByte();
|
||||||
float min = ( flags & 0x1 ) != 0 ? buf.readFloat() : -Float.MAX_VALUE;
|
float min = ( flags & 0x1 ) != 0 ? buf.readFloat() : -Float.MAX_VALUE;
|
||||||
float max = ( flags & 0x2 ) != 0 ? buf.readFloat() : -Float.MAX_VALUE;
|
float max = ( flags & 0x2 ) != 0 ? buf.readFloat() : Float.MAX_VALUE;
|
||||||
|
|
||||||
return FloatArgumentType.floatArg( min, max );
|
return FloatArgumentType.floatArg( min, max );
|
||||||
}
|
}
|
||||||
@ -386,7 +386,7 @@ public class Commands extends DefinedPacket
|
|||||||
{
|
{
|
||||||
byte flags = buf.readByte();
|
byte flags = buf.readByte();
|
||||||
double min = ( flags & 0x1 ) != 0 ? buf.readDouble() : -Double.MAX_VALUE;
|
double min = ( flags & 0x1 ) != 0 ? buf.readDouble() : -Double.MAX_VALUE;
|
||||||
double max = ( flags & 0x2 ) != 0 ? buf.readDouble() : -Double.MAX_VALUE;
|
double max = ( flags & 0x2 ) != 0 ? buf.readDouble() : Double.MAX_VALUE;
|
||||||
|
|
||||||
return DoubleArgumentType.doubleArg( min, max );
|
return DoubleArgumentType.doubleArg( min, max );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user