Changeset 3825


Ignore:
Timestamp:
03/14/08 18:44:18 (12 years ago)
Author:
curtis
Message:

Fix bug with arrays of shorts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/jvmlink/ConnThread.java

    r3824 r3825  
    346346            packetSize = totalBytes - readBytes; 
    347347          } 
    348             byte[] b = new byte[packetSize]; 
     348          byte[] b = new byte[packetSize]; 
    349349          in.readFully(b, 0, packetSize); 
    350350          for (int i=0; i<packetSize/8; i++) { 
     
    366366          byte[] b = new byte[packetSize]; 
    367367          in.readFully(b, 0, packetSize); 
    368           for (int i=0; i<packetSize/4; i++) { 
    369             shortArray[i + readBytes/4] = 
    370               DataTools.bytesToShort(b, 4*i, little); 
     368          for (int i=0; i<packetSize/2; i++) { 
     369            shortArray[i + readBytes/2] = 
     370              DataTools.bytesToShort(b, 2*i, little); 
    371371          } 
    372372          readBytes += packetSize; 
Note: See TracChangeset for help on using the changeset viewer.