[Biojava-dev] [patch] (trivial) fix for use of longs as unsigned ints in SCF.java

Joe Burks joe at wavicle.org
Sat Aug 23 14:42:48 EDT 2003


I believe the intention of lines such as:
                 hs.samples          = 0xFFFFFFFF & din.readInt();
was to allow the long value 'samples' to hold the integer read as 
unsigned.  Since both arguments are integers in this case, type promotion 
wasn't happening until assignment and large values were being sign extended 
into the long value.  This patch should fix those.

-Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scf.diff
Type: application/octet-stream
Size: 3866 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/biojava-dev/attachments/20030823/882251bf/scf.obj


More information about the biojava-dev mailing list