From 177471f85345b4ac2646166ca4a467217edf5bf4 Mon Sep 17 00:00:00 2001 From: "Andrew C. Oliver" Date: Sat, 23 Mar 2002 16:44:37 +0000 Subject: [PATCH] fixed bitmask off by 1 error 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scratchpad/src/org/apache/poi/generator/RecordUtil.java b/src/scratchpad/src/org/apache/poi/generator/RecordUtil.java index caebde7513..4ccb49b26e 100644 --- a/src/scratchpad/src/org/apache/poi/generator/RecordUtil.java +++ b/src/scratchpad/src/org/apache/poi/generator/RecordUtil.java @@ -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);