Skip to content

Commit 164378e

Browse files
nodes: fix off-by-one error in hex32, hex64 value types
thanks to @nbareil for reporting the issue in #38. closes #38.
1 parent b0bc270 commit 164378e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Evtx/Nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ def tag_length(self):
14691469
def string(self):
14701470
ret = "0x"
14711471
b = self.hex()[::-1]
1472-
for i in range(len(b) - 1):
1472+
for i in range(len(b)):
14731473
ret += '{:02x}'.format(six.indexbytes(b, i))
14741474
return ret
14751475

@@ -1489,7 +1489,7 @@ def tag_length(self):
14891489
def string(self):
14901490
ret = "0x"
14911491
b = self.hex()[::-1]
1492-
for i in range(len(b) - 1):
1492+
for i in range(len(b)):
14931493
ret += '{:02x}'.format(six.indexbytes(b, i))
14941494
return ret
14951495

0 commit comments

Comments
 (0)