]> source.dussan.org Git - poi.git/commitdiff
fixed bitmask off by 1 error
authorAndrew C. Oliver <acoliver@apache.org>
Sat, 23 Mar 2002 16:44:37 +0000 (16:44 +0000)
committerAndrew C. Oliver <acoliver@apache.org>
Sat, 23 Mar 2002 16:44:37 +0000 (16:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352265 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/generator/RecordUtil.java

index caebde75136927a077b429e692a8e74814ba7b36..4ccb49b26e3d1b216e839a5d27312f96ce25c7a9 100644 (file)
@@ -162,6 +162,7 @@ public class RecordUtil
 
     public static String getMask(int bit)
     {
+       if (bit > 1) bit--;
         int mask = (int)Math.pow(2, bit);
 
         return "0x" + Integer.toHexString(mask);