From: CNT systemen BV <cntsys@cistron.nl>
authorMarc G. Fournier <scrappy@hub.org>
Sun, 28 Sep 1997 10:05:15 +0000 (10:05 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Sun, 28 Sep 1997 10:05:15 +0000 (10:05 +0000)
I've found a problem in the Postgresql jdbc driver.
"ReceiveInteger" shifts a received byte right instead of left.
This means that only the least significant byte is read into the int.

Reviewed by: Peter T Mount <patches@maidast.demon.co.uk>

src/interfaces/jdbc/postgresql/PG_Stream.java

index 3e3350dd10d6ad61868c8a6156abf2de7c87f5e5..59804c6dc6b4ead83e65107d3df9c618b506dc62 100644 (file)
@@ -156,7 +156,7 @@ public class PG_Stream
            
            if (b < 0)
              throw new IOException("EOF");
-           n = n | (b >> (8 * i)) ;
+           n = n | (b << (8 * i)) ;
          }
       } catch (IOException e) {
        throw new SQLException("Error reading from backend: " + e.toString());