ObjectInputStream.java (readFields): Use long datatype when shifting byte values more then 24 bits left.
2004-07-09 Michael Koch <konqueror@gmx.de> * java/io/ObjectInputStream.java (readFields): Use long datatype when shifting byte values more then 24 bits left. From-SVN: r84382
This commit is contained in:
parent
559b79cf2b
commit
3d5f053c02
@ -1,3 +1,8 @@
|
||||
2004-07-09 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/io/ObjectInputStream.java (readFields): Use long datatype
|
||||
when shifting byte values more then 24 bits left.
|
||||
|
||||
2004-07-09 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/util/zip/DeflaterOutputStream.java,
|
||||
|
@ -1332,10 +1332,10 @@ public class ObjectInputStream extends InputStream
|
||||
|
||||
int off = field.getOffset();
|
||||
|
||||
return (long)(((prim_field_data[off++] & 0xFF) << 56)
|
||||
| ((prim_field_data[off++] & 0xFF) << 48)
|
||||
| ((prim_field_data[off++] & 0xFF) << 40)
|
||||
| ((prim_field_data[off++] & 0xFF) << 32)
|
||||
return (long)(((prim_field_data[off++] & 0xFFL) << 56)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 48)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 40)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 32)
|
||||
| ((prim_field_data[off++] & 0xFF) << 24)
|
||||
| ((prim_field_data[off++] & 0xFF) << 16)
|
||||
| ((prim_field_data[off++] & 0xFF) << 8)
|
||||
@ -1369,10 +1369,10 @@ public class ObjectInputStream extends InputStream
|
||||
int off = field.getOffset();
|
||||
|
||||
return Double.longBitsToDouble
|
||||
( (long) (((prim_field_data[off++] & 0xFF) << 56)
|
||||
| ((prim_field_data[off++] & 0xFF) << 48)
|
||||
| ((prim_field_data[off++] & 0xFF) << 40)
|
||||
| ((prim_field_data[off++] & 0xFF) << 32)
|
||||
( (long) (((prim_field_data[off++] & 0xFFL) << 56)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 48)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 40)
|
||||
| ((prim_field_data[off++] & 0xFFL) << 32)
|
||||
| ((prim_field_data[off++] & 0xFF) << 24)
|
||||
| ((prim_field_data[off++] & 0xFF) << 16)
|
||||
| ((prim_field_data[off++] & 0xFF) << 8)
|
||||
|
Loading…
Reference in New Issue
Block a user