summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-02-17 21:56:26 +0100
committerMichael Stahl <mstahl@redhat.com>2017-02-17 21:56:26 +0100
commit7e60cac0e789677a6e599c1f1ef1a2b1854ebe45 (patch)
treeb4cf120815aba61163de30e75f29833f87d6593d
parent77426bc7737e9fee9d6e0de085026fd04b820580 (diff)
docrecord: add some missing shifts in FFDataBits.dump
-rw-r--r--msodumper/docrecord.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index 77588ca..baa3d22 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -1199,13 +1199,13 @@ class FFDataBits(BinaryStream):
print '<FFDataBits>'
buf = self.readuInt8()
self.printAndSet("iType", buf & 0x0003, dict=IType) # 1..2nd bits
- self.printAndSet("iRes", buf & 0x007c) # 3..7th bits
+ self.printAndSet("iRes", (buf & 0x007c) >> 2) # 3..7th bits
self.printAndSet("fOwnHelp", self.getBit(buf, 8))
buf = self.readuInt8()
self.printAndSet("fOwnStat", self.getBit(buf, 1))
self.printAndSet("fProt", self.getBit(buf, 2))
self.printAndSet("iSize", self.getBit(buf, 3))
- self.printAndSet("iTypeTxt", buf & 0x0038, dict=ITypeTxt) # 4..6th bits
+ self.printAndSet("iTypeTxt", (buf & 0x0038) >> 3, dict=ITypeTxt) # 4..6th bits
self.printAndSet("fRecalc", self.getBit(buf, 7))
self.printAndSet("fHasListBox", self.getBit(buf, 8))
print '</FFDataBits>'