aboutsummaryrefslogtreecommitdiffstats
path: root/parse.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2019-06-13 10:38:59 +0000
committerbloodstalker <thabogre@gmail.com>2019-06-13 10:38:59 +0000
commit77103c2fad681c3d7a9d575181851117ea8da808 (patch)
tree9bbba58026f9114c73d0c42bcf58851148071a44 /parse.py
parentupdate (diff)
downloaddwasm-77103c2fad681c3d7a9d575181851117ea8da808.tar.gz
dwasm-77103c2fad681c3d7a9d575181851117ea8da808.zip
fixed a bug where string dumps where out of order. custom sections are getting dumped correctly now.
Diffstat (limited to '')
-rwxr-xr-xparse.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse.py b/parse.py
index ff28b8a..e4e9403 100755
--- a/parse.py
+++ b/parse.py
@@ -125,12 +125,19 @@ def ReadWASM(file_path, endianness, is_extended_isa, dbg):
name_len, offset, dummy = Read(temp_obj_file, offset, 'varuint32')
name = temp_obj_file[offset : offset + name_len]
offset += name_len
+ '''
+ if type(name) == list:
+ print(''.join([chr(elem) for elem in name]))
+ name = ''.join([chr(elem) for elem in name])
+ else:
+ print(name)
if name.find("reloc", 0, 5) == 0:
is_reloc_section = True
reloc_entry_count = Read(temp_obj_file, offset, 'varuint32')
for i in range(0, reloc_entry_count):
reloc_entry, offset, dummy = Read(tmp_obj, offset, 'varuint32')
reloc_entries.append(reloc_entry)
+ '''
else:
is_custom_section = False
name_len = 0