diff options
author | Michael Koch <konqueror@gmx.de> | 2004-07-09 15:37:31 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-07-09 15:37:31 +0000 |
commit | 3d5f053c02458ada47230963765efe2e09032f53 (patch) | |
tree | a6c5e303c392a8bc545ae3a1de2fef0fd3dc6440 /libjava/java | |
parent | 559b79cf2b0a5cbb9b2a2979b119a34e8cadc816 (diff) | |
download | gcc-3d5f053c02458ada47230963765efe2e09032f53.zip gcc-3d5f053c02458ada47230963765efe2e09032f53.tar.gz gcc-3d5f053c02458ada47230963765efe2e09032f53.tar.bz2 |
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
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/ObjectInputStream.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libjava/java/io/ObjectInputStream.java b/libjava/java/io/ObjectInputStream.java index 292f841..809e9b1 100644 --- a/libjava/java/io/ObjectInputStream.java +++ b/libjava/java/io/ObjectInputStream.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) |