diff --git a/dump_gdbindexes.py b/dump_gdbindexes.py index ffd58d7..6538d5a 100644 --- a/dump_gdbindexes.py +++ b/dump_gdbindexes.py @@ -51,12 +51,7 @@ def read_int32(f): return struct.unpack('i', v)[0] def read_utf16(f, nbcar): - # FIXME : only works with ASCII currently - val = '' - for j in range(nbcar): - val = val + '%c' % read_uint8(f) - f.read(1) - return val + return f.read(nbcar * 2).decode("utf-16le") f = open(filename, 'rb') nindexes = read_int32(f)