harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r773515 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
Date Mon, 11 May 2009 09:56:31 GMT
Author: sjanuary
Date: Mon May 11 09:56:30 2009
New Revision: 773515

URL: http://svn.apache.org/viewvc?rev=773515&view=rev
Log:
Pack200 - minor bug fix for encoding with non-full-range Codecs

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java?rev=773515&r1=773514&r2=773515&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
Mon May 11 09:56:30 2009
@@ -300,7 +300,11 @@
         } else {
             if (z < 0) {
                 // Need to use integer overflow here to represent negatives.
-                z += 4294967296L; // this value is equal to (1 << 32).
+                if(cardinality < 4294967296L) {
+                    z+= cardinality;
+                } else {
+                    z += 4294967296L; // this value is equal to (1 << 32).
+                }
             }
         }
         List byteList = new ArrayList();



Mime
View raw message