From 27efbcf5e1a0a84f2f8f888f1de0c737a776710f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 2 Sep 2008 14:54:34 -0600 Subject: [PATCH] fix single-byte BufferedInputStream.read to generate unsigned result --- classpath/java/io/BufferedInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classpath/java/io/BufferedInputStream.java b/classpath/java/io/BufferedInputStream.java index 51a1423606..585542492a 100644 --- a/classpath/java/io/BufferedInputStream.java +++ b/classpath/java/io/BufferedInputStream.java @@ -38,7 +38,7 @@ public class BufferedInputStream extends InputStream { } } - return buffer[position++]; + return buffer[position++] & 0xFF; } public int read(byte[] b, int offset, int length) throws IOException {