File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1014,7 +1014,7 @@ def fast_substitutions(self):
10141014 elif type_ == 0x14 :
10151015 value = "0x"
10161016 for c in self .unpack_binary (ofs , size )[::- 1 ]:
1017- value += "{:02x}" .format (ord ( c ) )
1017+ value += "{:02x}" .format (c )
10181018 sub_def .append (value )
10191019 #[21] = parse_hex64_type_node, -- Hex64TypeNode, 0x15
10201020 elif type_ == 0x15 :
@@ -1031,7 +1031,7 @@ def fast_substitutions(self):
10311031 bin = self .unpack_binary (ofs , size )
10321032 acc = []
10331033 while len (bin ) > 0 :
1034- match = re .search ("((?:[^\x00 ].)+)" , bin )
1034+ match = re .search (b "((?:[^\x00 ].)+)" , bin )
10351035 if match :
10361036 frag = match .group ()
10371037 acc .append ("<string>" )
@@ -1040,7 +1040,7 @@ def fast_substitutions(self):
10401040 bin = bin [len (frag ) + 2 :]
10411041 if len (bin ) == 0 :
10421042 break
1043- frag = re .search ("(\x00 *)" , bin ).group ()
1043+ frag = re .search (b "(\x00 *)" , bin ).group ()
10441044 if len (frag ) % 2 == 0 :
10451045 for _ in range (len (frag ) // 2 ):
10461046 acc .append ("<string></string>\n " )
You can’t perform that action at this time.
0 commit comments