Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Raynaud2012-10-12 07:51:21 +0000
committerXavier Raynaud2012-11-19 17:14:41 +0000
commita7a30bfef693e74286e60849a7c133561a5ba563 (patch)
treec053813fec22ac68143df107e06c5ff0f8f057db
parent41993cd2e384a77a0ada8bc81502ecd767cf71f2 (diff)
downloadorg.eclipse.linuxtools-a7a30bfef693e74286e60849a7c133561a5ba563.tar.gz
org.eclipse.linuxtools-a7a30bfef693e74286e60849a7c133561a5ba563.tar.xz
org.eclipse.linuxtools-a7a30bfef693e74286e60849a7c133561a5ba563.zip
ensure bytes returned as int are never negative
Change-Id: I173304573594c66d1d4eccaa9827ce6ac8154b94 Reviewed-on: https://git.eclipse.org/r/8203 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-by: Xavier Raynaud <xavier.raynaud@kalray.eu> IP-Clean: Xavier Raynaud <xavier.raynaud@kalray.eu> Tested-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java
index 84f961227f..dce20ae288 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/io/BufferedRandomAccessFile.java
@@ -124,7 +124,7 @@ public class BufferedRandomAccessFile extends RandomAccessFile {
if (buf_end == 0) {
return -1;
}
- return buffer[buf_pos++];
+ return (buffer[buf_pos++] & 0xff);
}
@Override

Back to the top