From b7e8cefc9216ee852499cb15935f879df1e1e3b7 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 9 Feb 2010 09:44:24 -0800 Subject: [PATCH] Decode side-band channel number as unsigned integer This field is unsigned in the protocol, so treat it as such when we report the channel number in errors. Change-Id: I20a52809c7a756e9f66b3557a4300ae1e11f6d25 Signed-off-by: Shawn O. Pearce --- .../src/org/eclipse/jgit/transport/SideBandInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java index 7b5422644..5f3b34e6f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java @@ -148,7 +148,7 @@ private void needDataPacket() throws IOException { return; } - channel = rawIn.read(); + channel = rawIn.read() & 0xff; available -= HDR_SIZE; // length header plus channel indicator if (available == 0) continue;