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);